fix(StatusChatToolBar) Fixing more menu not closing
The menu has a CloseOnReleaseOutside policy and so it was closing and immediately re-opened when the kebab icon was clicked since it's outside the menu area and also was calling the popup function of the menu. Added dummy bool property to detect whether the menu is already closed and not open it again Closes #308
This commit is contained in:
parent
32eeb91cd2
commit
01b297fe24
|
@ -88,10 +88,17 @@ Rectangle {
|
||||||
type: StatusFlatRoundButton.Type.Secondary
|
type: StatusFlatRoundButton.Type.Secondary
|
||||||
visible: !!statusChatToolBar.popupMenu
|
visible: !!statusChatToolBar.popupMenu
|
||||||
|
|
||||||
|
property bool showMoreMenu: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
statusChatToolBar.menuButtonClicked()
|
if (showMoreMenu) {
|
||||||
|
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
|
||||||
|
}
|
||||||
highlighted = true
|
highlighted = true
|
||||||
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
|
statusChatToolBar.menuButtonClicked()
|
||||||
|
}
|
||||||
|
|
||||||
|
onPressed: {
|
||||||
|
showMoreMenu = !showMoreMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusToolTip {
|
StatusToolTip {
|
||||||
|
|
Loading…
Reference in New Issue