Window frames in the style of V's Flatkit Aurorae theme, the classic frame as a setting
CI / test (push) Canceled after 52s

The default frame now follows codegod100/kde aurorae (Flatkit / Flatkit Dark): the kit's
neutral title bar, a 1px outline with 10px top corners, a hairline under the title, a soft
16px shadow all round, a centred title and 24px flat buttons with hover and pressed fills
(close turns red). 38px title bar, 1px border. Maximized: no shadow, square corners.

- scene: WindowStyle (frame sizes, button layout, hit test) and build_window_decoration;
  the shadow is part of the decoration ops, so the three rasterisers lost their own offset
  shadow and redraw 18px around a changed window.
- host: the frame size follows the style (work area, wm title-bar room, CSD client boxes,
  hit zones, screenshots); title-bar buttons track hover, show pressed, act on release.
- Settings > Session > Flat window frames (off: the old Breeze-like frame), saved as
  :window-style :breeze; an unknown value is logged.
- docs/window-frames.md; tests for both styles' pixels, button states and switching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hmKDDLLES2aBrrnPxT
This commit is contained in:
Claude committed 2026-11-26 04:09:38 +00:00
1 parent 2c2ce3f913
commit 14acc5d42e
20 files changed
+1005 -142

No files matched your search

+31 -1
View File
@@ -7,6 +7,7 @@
/// :desktop-card {:x 900 :y 24} ; where the desktop card was dragged to (absent: default spot)
/// :wallpaper :aurora ; the settings module's wallpaper (absent: :plasma-glow)
/// :theme :light ; the settings module's Dark mode switch is off (absent: dark)
/// :window-style :breeze ; Flat window frames is off: the classic frame (absent: :flat)
/// :power {:screen-off 5 :suspend 30} ; minutes without input before the screen goes off /
/// ; the computer suspends, 0 never (absent: 10 and 0)
/// :shortcuts {:show-desktop "Super+Ctrl+D" :screenshot-full ""}
@@ -53,6 +54,8 @@ pub(all) struct SavedState {
native_auth_agent : Bool?
/// From `:render`: :software or :hardware chosen in Settings (absent: as detected).
render : RenderMode?
/// From `:window-style`: :flat or :breeze (absent: flat).
window_style : @scene.WindowStyle?
}
///|
@@ -66,7 +69,7 @@ let layout_names : Array[String] = ["tiling", "monocle", "floating"]
///| The keys this build owns; everything else in the file is kept as it is.
let owned_keys : Array[String] = [
"layout", "recent", "desktop-card", "windows", "wallpaper", "restore-session", "remember-windows",
"theme", "power", "shortcuts", "terminal", "auth-agent", "render",
"theme", "power", "shortcuts", "terminal", "auth-agent", "render", "window-style",
]
///| How state.edn names each wallpaper, in `@libshell.wallpaper_names` order.
@@ -116,6 +119,7 @@ pub fn DesktopShell::load_state(self : DesktopShell) -> SavedState {
terminal: None,
native_auth_agent: None,
render: None,
window_style: None,
}
}
let entries = read_state_file()
@@ -253,6 +257,22 @@ pub fn DesktopShell::load_state(self : DesktopShell) -> SavedState {
}
_ => []
},
window_style: match lookup_key(entries, "window-style") {
None => None
Some(Keyword(k)) | Some(Text(k)) =>
match @scene.WindowStyle::parse(k) {
Some(st) => Some(st)
None => {
@sys.log("chandra: state.edn: unknown :window-style :" + k +
" (use :flat or :breeze); keeping the flat frame. Pick one in Settings > Session.")
None
}
}
Some(_) => {
@sys.log("chandra: state.edn: :window-style must be :flat or :breeze; keeping the flat frame.")
None
}
},
dark_mode: match lookup_key(entries, "theme") {
Some(Keyword("light")) => Some(false)
Some(Keyword("dark")) => Some(true)
@@ -282,6 +302,13 @@ pub fn DesktopShell::apply_state(self : DesktopShell, st : SavedState) -> Unit {
Some(b) => self.dark_mode = b
None => ()
}
match st.window_style {
Some(w) if w != self.window_style => {
self.window_style = w
self.actions.push(WindowStyleChanged)
}
_ => ()
}
match st.power.0 {
Some(m) if m >= 0 => self.screen_off_min = m
_ => ()
@@ -406,6 +433,9 @@ pub fn DesktopShell::save_state(self : DesktopShell) -> Unit {
if !self.dark_mode {
entries.insert(2, (@edn.Value::Keyword("theme"), @edn.Value::Keyword("light")))
}
if self.window_style != @scene.WindowStyle::Flat {
entries.insert(2, (@edn.Value::Keyword("window-style"), @edn.Value::Keyword(self.window_style.name())))
}
if !self.remember_windows {
entries.insert(2, (@edn.Value::Keyword("remember-windows"), @edn.Value::Bool(false)))
}