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
+3 -21
View File
@@ -23,7 +23,7 @@ Item {
id: left
anchors.left: parent.left
anchors.leftMargin: 6
anchors.right: right.left
anchors.right: systemArea.left
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
spacing: 8
@@ -54,28 +54,10 @@ Item {
}
}
Row {
id: right
SystemArea {
id: systemArea
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
spacing: windowControls.visible ? 8 : 0
WindowControls {
id: windowControls
anchors.verticalCenter: parent.verticalCenter
}
Rectangle {
visible: windowControls.visible
width: visible ? 1 : 0
height: 14
color: Theme.borderStrong
anchors.verticalCenter: parent.verticalCenter
}
SystemArea {
anchors.verticalCenter: parent.verticalCenter
}
}
}