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 {
|
||||
target: messageOptionsDrawer
|
||||
onCloseRequested: {
|
||||
messageListItem.additionalOptionsOpened = false;
|
||||
target: additionalOptionsOpened ? messageOptionsDrawer : null
|
||||
onOpenChanged: {
|
||||
if (!messageOptionsDrawer.open) {
|
||||
additionalOptionsOpened = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -750,16 +750,10 @@ Page {
|
|||
jointModel.push(messageOptionsModel[i]);
|
||||
}
|
||||
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
|
||||
dock: chatPage.isPortrait ? Dock.Bottom : Dock.Right
|
||||
backgroundSize: chatPage.isPortrait ? height / 3 : width / 2
|
||||
|
@ -793,7 +787,7 @@ Page {
|
|||
icon.source: "image://theme/icon-m-clear"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
messageOptionsDrawer.closeDrawer();
|
||||
messageOptionsDrawer.open = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -808,7 +802,7 @@ Page {
|
|||
}
|
||||
onClicked: {
|
||||
modelData.action();
|
||||
messageOptionsDrawer.closeDrawer();
|
||||
messageOptionsDrawer.open = false
|
||||
}
|
||||
hidden: !modelData.visible
|
||||
}
|
||||
|
@ -1919,6 +1913,11 @@ Page {
|
|||
controlSendButton();
|
||||
textReplacementTimer.restart();
|
||||
}
|
||||
onActiveFocusChanged: {
|
||||
if (activeFocus) {
|
||||
messageOptionsDrawer.open = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IconButton {
|
||||
|
|
Loading…
Reference in a new issue