From 03349ae33ffbbf2480ba681f14318b79d0bd8164 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 6 Mar 2021 17:29:59 -0400 Subject: [PATCH] Add "Add another account" entry to settings menu To do: replace the bottom-left "add account" button by something else, move the corresponding keybind code away --- src/gui/MainPane/MainPane.qml | 1 + src/gui/MainPane/TopBar.qml | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/gui/MainPane/MainPane.qml b/src/gui/MainPane/MainPane.qml index 38fb0945..ebb3e146 100644 --- a/src/gui/MainPane/MainPane.qml +++ b/src/gui/MainPane/MainPane.qml @@ -44,6 +44,7 @@ HDrawer { anchors.fill: parent TopBar { + roomList: roomList Layout.fillWidth: true } diff --git a/src/gui/MainPane/TopBar.qml b/src/gui/MainPane/TopBar.qml index a9de992f..53be986e 100644 --- a/src/gui/MainPane/TopBar.qml +++ b/src/gui/MainPane/TopBar.qml @@ -7,6 +7,8 @@ import ".." import "../Base" Rectangle { + property RoomList roomList + clip: true implicitHeight: theme.baseElementsHeight color: theme.mainPane.topBar.background @@ -25,6 +27,15 @@ Rectangle { id: settingsMenu y: parent.height + HMenuItem { + icon.name: "add-account" + text: qsTr("Add another account") + onTriggered: { + pageLoader.show("Pages/AddAccount/AddAccount.qml") + roomList.startCorrectItemSearch() + } + } + HMenuItem { icon.name: "more-settings" text: qsTr("Open configuration folder")