fix: toggle top bar menu on button click
This commit is contained in:
parent
a4ffc56d56
commit
317a183b8b
|
@ -97,6 +97,10 @@ Rectangle {
|
||||||
menu = groupContextMenu
|
menu = groupContextMenu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (menu.opened) {
|
||||||
|
return menu.close()
|
||||||
|
}
|
||||||
|
|
||||||
menu.popup(moreActionsBtn.x, moreActionsBtn.height)
|
menu.popup(moreActionsBtn.x, moreActionsBtn.height)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -105,6 +109,7 @@ Rectangle {
|
||||||
|
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: chatContextMenu
|
id: chatContextMenu
|
||||||
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||||
subMenuIcons: [
|
subMenuIcons: [
|
||||||
{
|
{
|
||||||
source: Qt.resolvedUrl("../../../img/fetch.svg"),
|
source: Qt.resolvedUrl("../../../img/fetch.svg"),
|
||||||
|
@ -142,6 +147,7 @@ Rectangle {
|
||||||
|
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: groupContextMenu
|
id: groupContextMenu
|
||||||
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||||
Action {
|
Action {
|
||||||
icon.source: "../../../img/group_chat.svg"
|
icon.source: "../../../img/group_chat.svg"
|
||||||
icon.width: chatTopBarContent.iconSize
|
icon.width: chatTopBarContent.iconSize
|
||||||
|
|
Loading…
Reference in New Issue