Merge pull request #390 from monich/drawer
Don't have on-screen keyboard and drawer visible simultaneously
This commit is contained in:
commit
3957ec27e4
2 changed files with 13 additions and 12 deletions
|
@ -80,9 +80,11 @@ ListItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: messageOptionsDrawer
|
target: additionalOptionsOpened ? messageOptionsDrawer : null
|
||||||
onCloseRequested: {
|
onOpenChanged: {
|
||||||
messageListItem.additionalOptionsOpened = false;
|
if (!messageOptionsDrawer.open) {
|
||||||
|
additionalOptionsOpened = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -750,16 +750,10 @@ Page {
|
||||||
jointModel.push(messageOptionsModel[i]);
|
jointModel.push(messageOptionsModel[i]);
|
||||||
}
|
}
|
||||||
drawerListView.model = jointModel;
|
drawerListView.model = jointModel;
|
||||||
|
focus = true // Take the focus away from the text field
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
signal closeRequested();
|
|
||||||
|
|
||||||
function closeDrawer() {
|
|
||||||
messageOptionsDrawer.closeRequested();
|
|
||||||
messageOptionsDrawer.open = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
dock: chatPage.isPortrait ? Dock.Bottom : Dock.Right
|
dock: chatPage.isPortrait ? Dock.Bottom : Dock.Right
|
||||||
backgroundSize: chatPage.isPortrait ? height / 3 : width / 2
|
backgroundSize: chatPage.isPortrait ? height / 3 : width / 2
|
||||||
|
@ -793,7 +787,7 @@ Page {
|
||||||
icon.source: "image://theme/icon-m-clear"
|
icon.source: "image://theme/icon-m-clear"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
onClicked: {
|
onClicked: {
|
||||||
messageOptionsDrawer.closeDrawer();
|
messageOptionsDrawer.open = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -808,7 +802,7 @@ Page {
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
modelData.action();
|
modelData.action();
|
||||||
messageOptionsDrawer.closeDrawer();
|
messageOptionsDrawer.open = false
|
||||||
}
|
}
|
||||||
hidden: !modelData.visible
|
hidden: !modelData.visible
|
||||||
}
|
}
|
||||||
|
@ -1919,6 +1913,11 @@ Page {
|
||||||
controlSendButton();
|
controlSendButton();
|
||||||
textReplacementTimer.restart();
|
textReplacementTimer.restart();
|
||||||
}
|
}
|
||||||
|
onActiveFocusChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
messageOptionsDrawer.open = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IconButton {
|
IconButton {
|
||||||
|
|
Loading…
Reference in a new issue