diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-07 12:05:29 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-07 12:05:29 +0100 |
| commit | 3d871cd89c7ccde777a54916d8a3232cfb7ce5e9 (patch) | |
| tree | aa3f46345daeea2a926e739c8ca405e6b882371a | |
| parent | 9e56c0bc91478e729e30c5222ca618e3f01f458f (diff) | |
| download | quickshell-3d871cd89c7ccde777a54916d8a3232cfb7ce5e9.tar.gz quickshell-3d871cd89c7ccde777a54916d8a3232cfb7ce5e9.zip | |
prefs: the Sonix boot logo editor's settings
| -rw-r--r-- | desktop/Prefs.qml | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml index c238990..ef2ac72 100644 --- a/desktop/Prefs.qml +++ b/desktop/Prefs.qml @@ -72,6 +72,18 @@ Singleton { root.write(Object.assign({}, root.doc, { wallTransition: t })); } + // The Sonix boot logo editor (modules/sonix/BootlogoTab.qml): text ("" for + // $USER), font key, size, centre x/y in the 480x800 frame, fill and second + // colour (hex or "udt"), offset and its direction, output folder ("" for + // ~/Pictures/sonix-bootlogo). The picture is not kept. + readonly property var bootlogoDefaults: ({ text: "", font: "bungee", size: 110, x: 240, y: 690, + fill: "#ffffff", second: "#e5a50a", offset: 8, dir: "se", folder: "" }) + property var bootlogo: bootlogoDefaults + function setBootlogo(b) { + root.bootlogo = Object.assign({}, root.bootlogoDefaults, b); + root.write(Object.assign({}, root.doc, { bootlogo: root.bootlogo })); + } + // The whole parsed object, so a write keeps keys this version does not // know about. property var doc: ({}) @@ -139,6 +151,9 @@ Singleton { // object here would throw away the transitions page's draft. const wt = parsed.wallTransition !== undefined ? parsed.wallTransition : null; if (JSON.stringify(wt) !== JSON.stringify(root.wallTransition)) root.wallTransition = wt; + const bl = parsed.bootlogo && typeof parsed.bootlogo === "object" && !Array.isArray(parsed.bootlogo) + ? parsed.bootlogo : {}; + root.bootlogo = Object.assign({}, root.bootlogoDefaults, bl); } FileView { @@ -153,6 +168,6 @@ Singleton { onFileChanged: reload() onLoaded: root.reparse() // Missing file: the defaults, and nothing written. - onLoadFailed: { root.doc = {}; root.pinnedIp = ""; root.presets = null; root.settingsSidebar = 200; root.assistantModel = ""; root.wallEngine = root.wallEngineDefaults; root.wallTransition = null; } + onLoadFailed: { root.doc = {}; root.pinnedIp = ""; root.presets = null; root.settingsSidebar = 200; root.assistantModel = ""; root.wallEngine = root.wallEngineDefaults; root.wallTransition = null; root.bootlogo = root.bootlogoDefaults; } } } |
