feat: add saved setting for Compact mode
This commit is contained in:
parent
5951fcf131
commit
36f230e03d
|
@ -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
|
||||
|
|
|
@ -51,7 +51,7 @@ SplitView {
|
|||
NotificationsContainer {}
|
||||
|
||||
AdvancedContainer {
|
||||
appSettings: profileView.appSettings
|
||||
appSettings: profileView.appSettings
|
||||
}
|
||||
|
||||
HelpContainer {}
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -62,6 +62,7 @@ ApplicationWindow {
|
|||
property var walletSplitView
|
||||
property var profileSplitView
|
||||
property bool displayChatImages: false
|
||||
property bool compactMode
|
||||
}
|
||||
|
||||
SystemTrayIcon {
|
||||
|
|
Loading…
Reference in New Issue