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 scrollToBottom: function () {}
property var appSettings property var appSettings
property bool isCompact: true property bool isCompact: appSettings.compactMode
id: messageItem id: messageItem
width: parent.width width: parent.width

View File

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

View File

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