diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-22 17:26:57 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-22 17:26:57 +0200 |
| commit | b810188a4b106ee84e1971b0bbd928d27528171f (patch) | |
| tree | a41ba51ecb5129d42e5e3504e6d726ae2c0f98a5 /desktop/modules/appearance/ThemeModule.qml | |
| parent | 9d9e67a14967fe756c357b0ece3d9f339f8afa17 (diff) | |
| download | quickshell-b810188a4b106ee84e1971b0bbd928d27528171f.tar.gz quickshell-b810188a4b106ee84e1971b0bbd928d27528171f.zip | |
theme: stage a scheme and commit it from the header
The Theme page applied a scheme on click, so a stray click reinstalled the
whole theme, and it was the one settings page without the header's
commit point. Clicking now stages the scheme (outlined yellow, "selected"),
and Reset / Apply in the header drop or apply it, as the wallpaper page
does. The applied notice and any failure moved into the SaveBar, and the
sidebar marks the page dirty while a scheme is staged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/appearance/ThemeModule.qml')
| -rw-r--r-- | desktop/modules/appearance/ThemeModule.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop/modules/appearance/ThemeModule.qml b/desktop/modules/appearance/ThemeModule.qml index 97ca519..ec9b098 100644 --- a/desktop/modules/appearance/ThemeModule.qml +++ b/desktop/modules/appearance/ThemeModule.qml @@ -19,6 +19,7 @@ Module { // nf-fa-paintbrush, present in Inconsolata Nerd Font. icon: "\uf1fc" settings: true + dirty: Udt.dirty group: "Appearance" keywords: ["colour", "color", "scheme", "palette", "accent", "udt"] searchItems: Array.from(Udt.names).map(n => ({ text: n, key: n })) @@ -28,6 +29,23 @@ Module { page: Component { Page { title: "Theme" + actions: Component { + SaveBar { + id: bar + saveText: "Apply"; discardText: "Reset"; dirty: Udt.dirty; busy: Udt.applying + onSave: { bar.error = ""; bar.notice = ""; Udt.apply(Udt.pending); } + onDiscard: { bar.error = ""; Udt.pending = ""; } + // install.sh reloads Hyprland, kitty and conky; the notice + // says what it cannot reach. + Connections { + target: Udt + function onApplied(scheme, ok, message) { + bar.error = ok ? "" : `failed: ${message}`; + bar.notice = ok ? `${scheme} applied. Restart Qt, GTK, btop and Joplin; neovim needs :colorscheme udt.` : ""; + } + } + } + } ThemeTab { width: parent.width } } } |
