Settings module: the wallpaper chooser moves in, and a Dark mode switch
CI / test (push) Failing after 16s
CI / test (push) Failing after 16s
- The session settings module becomes the panel's "Settings" button. Its popup lists the session switches, then a "Wallpaper" heading and the wallpapers (current one ticked); a click on a wallpaper shows it at once, as the old chooser did. Up/Down skip the heading. - The standalone wallpaper module and its world are removed. A saved panel.edn that lists "wallpaper" gets the settings module in its place (or just drops it when Settings is there). - New "Dark mode" setting (on by default). Off swaps the compositor to the Moon Day palette (ThemeTokens::moon_day, the values of config/themes/moon-day.json) for the shell, panel modules, window decorations and the switcher; on goes back to the configured theme. Saved in state.edn as :theme :light (absent or :dark: dark) and applied at startup by restore_state. - Tests: the native wallpaper test drives the settings module, the settings test flips Dark mode and checks the theme, the state.edn round trip covers :theme, panel migration unit test, and the host-wasm test covers the switches and the wallpaper rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
This commit is contained in:
26 files changed
+295
-878
No files matched your search
@@ -139,6 +139,8 @@ pub(all) enum ShellAction {
|
||||
FocusWindow(UInt64)
|
||||
/// A module (the logout button) asked to end the session.
|
||||
Logout
|
||||
/// The Dark mode setting changed: the compositor swaps the theme (see `dark_mode`).
|
||||
ThemeChanged
|
||||
} derive(Eq, Debug)
|
||||
|
||||
///| One wasm module loaded into the panel.
|
||||
@@ -206,6 +208,8 @@ pub(all) struct DesktopShell {
|
||||
/// last session's windows at the next start, and remember where floating windows were left.
|
||||
mut restore_session : Bool
|
||||
mut remember_windows : Bool
|
||||
/// Dark mode (the configured theme) or light (Moon Day); saved as `:theme :light` when off.
|
||||
mut dark_mode : Bool
|
||||
mut desk_set : Bool
|
||||
mut desk_x : Int
|
||||
mut desk_y : Int
|
||||
@@ -292,6 +296,7 @@ pub fn DesktopShell::new(display : String) -> DesktopShell {
|
||||
wallpaper_sel: 0,
|
||||
restore_session: true,
|
||||
remember_windows: true,
|
||||
dark_mode: true,
|
||||
desk_set: false,
|
||||
desk_x: 0,
|
||||
desk_y: 0,
|
||||
|
||||
Reference in new issue
Block a user