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
|
property bool showMoreMenu: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (showMoreMenu) {
|
if (!showMoreMenu) {
|
||||||
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
|
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
|
||||||
|
statusChatToolBar.menuButtonClicked()
|
||||||
}
|
}
|
||||||
highlighted = true
|
|
||||||
statusChatToolBar.menuButtonClicked()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressed: {
|
Timer {
|
||||||
showMoreMenu = !showMoreMenu;
|
id: menuClosedUpdater
|
||||||
|
interval: 100
|
||||||
|
repeat: false
|
||||||
|
onTriggered: {
|
||||||
|
menuButton.showMoreMenu = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
@ -110,9 +114,15 @@ Rectangle {
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
popupMenuSlot.item.closeHandler = function () {
|
popupMenuSlot.item.closeHandler = function () {
|
||||||
menuButton.highlighted = false
|
menuButton.highlighted = false
|
||||||
|
menuClosedUpdater.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
popupMenuSlot.item.openHandler = function () {
|
||||||
|
menuButton.highlighted = true
|
||||||
|
menuButton.showMoreMenu = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
Loading…
Reference in New Issue