Add "every room" button

This commit is contained in:
miruka 2020-04-28 16:18:18 -04:00
parent bbc462239c
commit 34f98b48d1
4 changed files with 30 additions and 10 deletions

View File

@ -260,11 +260,12 @@ class UISettings(JSONDataFile):
"previousTab": ["Alt+Shift+Left", "Alt+Shift+H"], "previousTab": ["Alt+Shift+Left", "Alt+Shift+H"],
"nextTab": ["Alt+Shift+Right", "Alt+Shift+L"], "nextTab": ["Alt+Shift+Right", "Alt+Shift+L"],
"showEveryRoom": ["Alt+E"],
"addNewAccount": ["Alt+Shift+A"],
"accountSettings": ["Alt+A"],
"addNewChat": ["Alt+C"],
"toggleFocusMainPane": ["Alt+F"], "toggleFocusMainPane": ["Alt+F"],
"clearRoomFilter": ["Alt+Shift+F"], "clearRoomFilter": ["Alt+Shift+F"],
"accountSettings": ["Alt+A"],
"addNewAccount": ["Alt+Shift+A"],
"addNewChat": ["Alt+C"],
"goToLastPage": ["Ctrl+Tab"], "goToLastPage": ["Ctrl+Tab"],
"goToPreviousAccount": ["Alt+Shift+N"], "goToPreviousAccount": ["Alt+Shift+N"],

View File

@ -12,14 +12,18 @@ HColumnLayout {
HButton { HButton {
id: settingsButton id: everyRoomButton
backgroundColor: theme.accountsBar.settingsButtonBackground icon.name: "every-room"
icon.name: "settings" toolTip.text: qsTr("Every room")
toolTip.text: qsTr("Open config folder") backgroundColor: theme.accountsBar.everyRoomButtonBackground
// onClicked: pageLoader.showPage("AddAccount/AddAccount")
onClicked: py.callCoro("get_config_dir", [], Qt.openUrlExternally)
Layout.preferredHeight: theme.baseElementsHeight Layout.preferredHeight: theme.baseElementsHeight
HShortcut {
sequences: window.settings.keys.showEveryRoom
onActivated: everyRoomButton.clicked()
}
} }
HListView { HListView {
@ -107,4 +111,15 @@ HColumnLayout {
onActivated: addAccountButton.clicked() onActivated: addAccountButton.clicked()
} }
} }
HButton {
id: settingsButton
backgroundColor: theme.accountsBar.settingsButtonBackground
icon.name: "settings"
toolTip.text: qsTr("Open config folder")
onClicked: py.callCoro("get_config_dir", [], Qt.openUrlExternally)
Layout.preferredHeight: theme.baseElementsHeight
}
} }

View File

@ -0,0 +1,3 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m21.698 10.658 2.302 1.342-12.002 7-11.998-7 2.301-1.342 9.697 5.658zm-9.7 10.657-9.697-5.658-2.301 1.343 11.998 7 12.002-7-2.302-1.342zm0-19 8.032 4.685-8.032 4.685-8.029-4.685zm0-2.315-11.998 7 11.998 7 12.002-7-12.002-7z"/>
</svg>

After

Width:  |  Height:  |  Size: 331 B

View File

@ -275,8 +275,9 @@ ui:
accountsBar: accountsBar:
color settingsButtonBackground: colors.strongerBackground color everyRoomButtonBackground: colors.strongerBackground
color addAccountButtonBackground: colors.strongerBackground color addAccountButtonBackground: colors.strongerBackground
color settingsButtonBackground: colors.strongerBackground
accountList: accountList:
color background: colors.strongerBackground color background: colors.strongerBackground