diff options
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 } } } |
