fix the switch
This commit is contained in:
@@ -37,7 +37,8 @@ CustomRect {
|
|||||||
|
|
||||||
SettingSwitch {
|
SettingSwitch {
|
||||||
name: "wallust"
|
name: "wallust"
|
||||||
setting: Config.general.color.wallust
|
object: Config.general.color
|
||||||
|
setting: "wallust"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user