Settings UI for color scheme presets
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 12s
Python / lint-format (pull_request) Successful in 25s
Python / test (pull_request) Successful in 53s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m52s

This commit is contained in:
2026-05-23 20:13:56 +02:00
parent 5df46160f6
commit 96afbdb30b
29 changed files with 695 additions and 42 deletions
+27 -4
View File
@@ -11,10 +11,32 @@ Item {
required property string name
required property var object
property alias row: row
required property string setting
property bool shouldBeActive: true
required property list<var> stringList
Layout.fillWidth: true
Layout.preferredHeight: row.height
signal optionSet
anchors.left: parent.left
anchors.right: parent.right
implicitHeight: shouldBeActive ? row.height : 0
opacity: shouldBeActive ? 1 : 0
scale: shouldBeActive ? 1 : 0.8
visible: opacity > 0
Behavior on opacity {
Anim {
}
}
Behavior on scale {
Anim {
}
}
Behavior on y {
Anim {
}
}
RowLayout {
id: row
@@ -120,17 +142,18 @@ Item {
StateLayer {
onClicked: {
root.object[root.setting] = fontDelegate.modelData;
root.optionSet();
Config.save();
}
}
}
model: ScriptModel {
values: {
const fonts = Qt.fontFamilies();
const values = root.stringList;
const search = fontSearch.text;
var regex = new RegExp(search, "i");
return fonts.filter(n => regex.test(n));
return values.filter(n => regex.test(n));
}
}
}