feat: add saved setting for Compact mode

This commit is contained in:
Jonathan Rainville 2020-07-14 17:23:17 -04:00 committed by Iuri Matias
parent 5951fcf131
commit 36f230e03d
4 changed files with 24 additions and 4 deletions

View File

@ -36,7 +36,7 @@ Item {
property var scrollToBottom: function () {}
property var appSettings
property bool isCompact: true
property bool isCompact: appSettings.compactMode
id: messageItem
width: parent.width

View File

@ -51,7 +51,7 @@ SplitView {
NotificationsContainer {}
AdvancedContainer {
appSettings: profileView.appSettings
appSettings: profileView.appSettings
}
HelpContainer {}

View File

@ -6,6 +6,7 @@ import "../../../../shared"
Item {
property var appSettings
id: advancedContainer
width: 200
height: 200
@ -46,18 +47,36 @@ Item {
}
Switch {
checked: themeSetting.isDarkTheme
onCheckedChanged: function(value) {
onToggled: function() {
profileModel.changeTheme(themeSetting.isDarkTheme ? 0 : 1)
}
}
}
RowLayout {
id: walletTabSettings
property bool isCompactMode: appSettings.compactMode
id: compactModeSetting
anchors.top: themeSetting.bottom
anchors.topMargin: 20
anchors.left: parent.left
anchors.leftMargin: 24
StyledText {
text: qsTr("Chat Compact Mode")
}
Switch {
checked: compactModeSetting.isCompactMode
onToggled: function() {
appSettings.compactMode = !compactModeSetting.isCompactMode
}
}
}
RowLayout {
id: walletTabSettings
anchors.top: compactModeSetting.bottom
anchors.topMargin: 20
anchors.left: parent.left
anchors.leftMargin: 24
StyledText {
//% "Wallet Tab"
text: qsTrId("wallet-tab")

View File

@ -62,6 +62,7 @@ ApplicationWindow {
property var walletSplitView
property var profileSplitView
property bool displayChatImages: false
property bool compactMode
}
SystemTrayIcon {