From 8afd7b289204bd6c0766b6586a2784b2eedc173e Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Sun, 10 Sep 2023 20:40:11 +0300 Subject: [PATCH] Give "+" tool button a proper a11y role and an RTL-friendly modal menu --- src/qml/Page/RoomList/ExploreComponent.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/qml/Page/RoomList/ExploreComponent.qml b/src/qml/Page/RoomList/ExploreComponent.qml index 6ee299d81..3e7fb3144 100644 --- a/src/qml/Page/RoomList/ExploreComponent.qml +++ b/src/qml/Page/RoomList/ExploreComponent.qml @@ -55,6 +55,7 @@ RowLayout { QQC2.ToolButton { id: menuButton + Accessible.role: Accessible.ButtonMenu display: QQC2.AbstractButton.IconOnly checkable: true action: Kirigami.Action { @@ -62,10 +63,10 @@ RowLayout { icon.name: "irc-join-channel" onTriggered: { if (Kirigami.isMobile) { - let menu = mobileMenu.createObject(); + const menu = mobileMenu.createObject(); menu.open(); } else { - let menu = desktopMenu.createObject(menuButton, {y: menuButton.height}); + const menu = desktopMenu.createObject(menuButton); menu.closed.connect(menuButton.toggle) menu.open(); } @@ -80,6 +81,12 @@ RowLayout { Component { id: desktopMenu QQC2.Menu { + x: mirrored ? parent.width - width : 0 + y: parent ? parent.height : 0 + + modal: true + dim: false + QQC2.MenuItem { action: exploreAction }