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

+5 -25
View File
@@ -556,8 +556,9 @@ fn draw_backdrop_rest(clip : R?) -> Unit {
}
}
///| Room around a window for its drop shadow (4 px right, 6 px down) and a little slack.
const SHADOW_PAD : Int = 8
///| Room around a window's frame for its shadow, which the decoration ops draw (up to 16 px all
/// round for the flat frame, `@scene.decoration_shadow_reach`).
const SHADOW_PAD : Int = 18
///| What a window covers on screen: its decoration and drop shadow, or just itself when fullscreen.
fn window_footprint(win : @wt.Val) -> R {
@@ -798,30 +799,9 @@ fn submit(v : @wt.Val) -> Unit {
}
if !win.field("fullscreen").to_bool() && !(occluded && wi == first) {
let it = win.field("inset-top").to_int()
let ir = win.field("inset-right").to_int()
let ib = win.field("inset-bottom").to_int()
let il = win.field("inset-left").to_int()
let outer_x = g.x - il
let outer_y = g.y - it
let outer_w = g.w + il + ir
let outer_h = g.h + it + ib
// Subtle drop shadow: only the strips that stick out from under the window (and the part
// under the translucent title bar) are blended.
let strips : Array[R] = [
{ x: outer_x + outer_w, y: outer_y, w: 4, h: outer_h + 6 },
{ x: outer_x, y: outer_y + outer_h, w: outer_w + 4, h: 6 },
{ x: outer_x, y: outer_y, w: outer_w, h: it + 2 },
]
for s in strips {
match intersect(Some(s), clip) {
Some(k) if !k.empty() => {
set_clip(Some(k))
rs_fill_rect(outer_x + 4, outer_y + 6, outer_w, outer_h, 0, 0, 0, 80, 8)
}
_ => ()
}
}
draw_ops(win.field("deco").to_list(), outer_x, outer_y, clip)
// The frame, shadow included, is all in the decoration ops.
draw_ops(win.field("deco").to_list(), g.x - il, g.y - it, clip)
}
set_clip(clip)
if rs_blit_surface(win.field("surface").to_uint(), g.x, g.y, g.w, g.h) == 0 {