From b810188a4b106ee84e1971b0bbd928d27528171f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 22 Oct 2026 17:26:57 +0200 Subject: 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 --- desktop/modules/appearance/ThemeModule.qml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'desktop/modules/appearance/ThemeModule.qml') 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 } } } -- cgit v1.2.3