fix(StatusChatToolBar): Fix mouse event catching after menu closing
Closes: #350
This commit is contained in:
parent
07540b2463
commit
5394abb767
|
@ -93,15 +93,19 @@ Rectangle {
|
|||
|
||||
property bool showMoreMenu: false
|
||||
onClicked: {
|
||||
if (showMoreMenu) {
|
||||
if (!showMoreMenu) {
|
||||
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
|
||||
}
|
||||
highlighted = true
|
||||
statusChatToolBar.menuButtonClicked()
|
||||
}
|
||||
}
|
||||
|
||||
onPressed: {
|
||||
showMoreMenu = !showMoreMenu;
|
||||
Timer {
|
||||
id: menuClosedUpdater
|
||||
interval: 100
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
menuButton.showMoreMenu = false
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
@ -110,6 +114,12 @@ Rectangle {
|
|||
onLoaded: {
|
||||
popupMenuSlot.item.closeHandler = function () {
|
||||
menuButton.highlighted = false
|
||||
menuClosedUpdater.start()
|
||||
}
|
||||
|
||||
popupMenuSlot.item.openHandler = function () {
|
||||
menuButton.highlighted = true
|
||||
menuButton.showMoreMenu = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue