fix: toggle top bar menu on button click

This commit is contained in:
Jonathan Rainville 2021-01-11 15:08:35 -05:00 committed by Iuri Matias
parent a4ffc56d56
commit 317a183b8b
1 changed files with 6 additions and 0 deletions

View File

@ -97,6 +97,10 @@ Rectangle {
menu = groupContextMenu
}
if (menu.opened) {
return menu.close()
}
menu.popup(moreActionsBtn.x, moreActionsBtn.height)
}
@ -105,6 +109,7 @@ Rectangle {
PopupMenu {
id: chatContextMenu
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
subMenuIcons: [
{
source: Qt.resolvedUrl("../../../img/fetch.svg"),
@ -142,6 +147,7 @@ Rectangle {
PopupMenu {
id: groupContextMenu
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
Action {
icon.source: "../../../img/group_chat.svg"
icon.width: chatTopBarContent.iconSize