Files
Claude 14acc5d42e
CI / test (push) Canceled after 52s
Window frames in the style of V's Flatkit Aurorae theme, the classic frame as a setting
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
2026-11-26 04:09:38 +00:00

18 lines
800 B
MoonBit

///| Resizing the output (the nested window was resized): the desktop is drawn at the new size.
///|
test "resize redraws the desktop at the new output size" {
let socket_path = "/tmp/wayland-moon-resize-" + @sys.getpid().to_string() + ".sock"
let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap()
let before = comp.compose_frame()
assert_eq((before.width, before.height), (1280, 720))
comp.resize(900, 560)
let after = comp.compose_frame()
assert_eq((after.width, after.height), (900, 560))
assert_eq((comp.output_w, comp.output_h), (900, 560))
// The flat frame's 38px title bar is kept free at the top.
assert_eq(comp.work_area.h, 560 - 38 - comp.theme.panel_height)
assert_eq(comp.server.output_w, 900)
comp.close()
}