fix the switch

This commit is contained in:
Zacharias-Brohn
2026-02-23 23:24:11 +01:00
parent 412119aa89
commit 40cd984b6d
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ CustomRect {
SettingSwitch { SettingSwitch {
name: "wallust" name: "wallust"
setting: Config.general.color.wallust object: Config.general.color
setting: "wallust"
} }
} }
} }
+4 -3
View File
@@ -10,7 +10,8 @@ import qs.Helpers
RowLayout { RowLayout {
id: root id: root
required property bool setting required property var object
required property string setting
required property string name required property string name
Layout.preferredHeight: 42 Layout.preferredHeight: 42
@@ -30,9 +31,9 @@ RowLayout {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
checked: root.setting checked: root.object[root.setting]
onToggled: { onToggled: {
root.setting = checked; root.object[root.setting] = checked;
Config.save(); Config.save();
} }
} }