Add floating traffic-light window chrome

Introduces a dedicated layer-shell `WindowChromeSurface` that renders macOS-style traffic-light controls over the focused Sway window titlebar, replacing the old top-bar window controls. Adds theme tokens and a reusable `TrafficLightButton` component, updates shell QML/CMake wiring, and adjusts Sway titlebar padding/title format so window titles do not overlap the overlay. Window tracking was extended with focused-window geometry/deco/fullscreen properties plus backend refresh support so the chrome follows window movement and state changes in near real time.
This commit is contained in:
2026-08-26 22:38:33 +12:00
parent 08e67845a5
commit 4321209e92
14 changed files with 452 additions and 92 deletions
+8 -5
View File
@@ -46,17 +46,20 @@ focus_follows_mouse yes
# Sway draws a restrained title bar and border on normal application windows
# so they can be identified, dragged, and resized with the mouse.
#
# This is temporary infrastructure. Nebula does not yet own client/server-side
# decorations. Do not treat these colours or metrics as the final design.
# Nebula overlays traffic-light controls on the focused window title bar.
# Horizontal padding keeps the Sway title text clear of those buttons.
# Menu-style chrome (application name, future File/Edit) stays in the top bar.
#
# Layer-shell surfaces (desktop, top bar, launcher) are not xdg_shell/XWayland
# views and are not decorated by these settings.
# This is temporary infrastructure until Nebula owns server-side decorations.
# Layer-shell surfaces (desktop, top bar, launcher, window chrome) are not
# xdg_shell/XWayland views and are not decorated by these settings.
font pango:Ubuntu 10
titlebar_padding 7 3
titlebar_padding 12 8
titlebar_border_thickness 1
default_border normal 1
default_floating_border normal 1
hide_edge_borders none
title_format " %title"
# class border backgr. text indicator child_border
client.focused #3d4d62 #1a222e #e8ecf2 #7ea0c4 #3d4d62