summaryrefslogtreecommitdiffstats
path: root/resources/qml/RoomList.qml
diff options
context:
space:
mode:
authorShootingStarDragons <ShootingStarDragons@protonmail.com>2023-01-23 20:15:43 +0800
committerShootingStarDragons <ShootingStarDragons@protonmail.com>2023-01-23 20:15:43 +0800
commit7d95ac23cecdec48b3c84a42afdfbed5b6d870a8 (patch)
treec48f00798c50a6b2a07a695b0bb1bf4fb18e0daf /resources/qml/RoomList.qml
parent1d8fc18304c418f8dcb50ce1f8d2b84c4bf22fb9 (diff)
feat: hide all popup menus when press leftbutton on somewhere else
Log: according to the bug on https://bugreports.qt.io/browse/QTBUG-83972, The menu will always stay if not click one of the item. So I try to make a hack for it, wait qt solve it someday
Diffstat (limited to 'resources/qml/RoomList.qml')
-rw-r--r--resources/qml/RoomList.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml
index 40ecdd34..348d104f 100644
--- a/resources/qml/RoomList.qml
+++ b/resources/qml/RoomList.qml
@@ -20,6 +20,15 @@ Page {
property int avatarSize: Math.ceil(fontMetrics.lineSpacing * 2.3)
property bool collapsed: false
+ // HACK: https://bugreports.qt.io/browse/QTBUG-83972, qtwayland cannot auto hide menu
+ Connections {
+ function onHideMenu() {
+ userInfoMenu.close()
+ roomContextMenu.close()
+ }
+ target: MainWindow
+ }
+
Component {
id: roomDirectoryComponent