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
b345c75a4c
commit
a8e830f76c
|
@ -88,11 +88,18 @@ Rectangle {
|
|||
type: StatusFlatRoundButton.Type.Secondary
|
||||
visible: !!statusChatToolBar.popupMenu
|
||||
|
||||
property bool showMoreMenu: false
|
||||
onClicked: {
|
||||
statusChatToolBar.menuButtonClicked()
|
||||
highlighted = true
|
||||
if (showMoreMenu) {
|
||||
popupMenuSlot.item.popup(-popupMenuSlot.item.width + menuButton.width, menuButton.height + 4)
|
||||
}
|
||||
highlighted = true
|
||||
statusChatToolBar.menuButtonClicked()
|
||||
}
|
||||
|
||||
onPressed: {
|
||||
showMoreMenu = !showMoreMenu;
|
||||
}
|
||||
|
||||
StatusToolTip {
|
||||
visible: !!text && parent.hovered && !popupMenuSlot.item.opened
|
||||
|
|
Loading…
Reference in New Issue