feat: complete quickshell redesign

This commit is contained in:
johannes committed 2026-09-17 19:56:15 +02:00
1 parent 5245f4aaf2
commit 8be610fbdd
25 files changed
+1410 -401

No files matched your search

@@ -1,26 +1,47 @@
import QtQuick
import QtQuick.Effects
import "."
// Base panel/card chrome shared by menus, pickers, and dialogs: rounded
// background, border, optional colored glow.
Rectangle {
// Base panel/card chrome shared by menus, pickers, and dialogs: sharp
// corners, a solid 2px border, and a hard offset "shadow" - a flat duplicate
// rectangle displaced down-right, never blurred. `glow` switches the border
// and shadow from the default crust to `tint` (DESIGN.md's "Focused /
// Active" state, also used for danger/selected emphasis). `pressed`
// collapses the shadow and slides the face onto it - the mechanical
// depression press effect. Children declared on a Surface instance attach
// to the face, not the outer Item, so they translate together with it.
Item {
id: surface
property color tint: Theme.colors.border
default property alias content: face.data
property alias color: face.color
property color tint: Theme.colors.primary
property bool glow: false
property bool pressed: false
radius: Theme.geometry.radiusMedium
color: Theme.colors.background
border.color: tint
border.width: 1
readonly property int offset: glow ? Theme.elevation.high : Theme.elevation.low
readonly property color edgeColor: glow ? tint : Theme.colors.crust
layer.enabled: glow
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: surface.tint
shadowOpacity: Theme.elevation.medium.opacity
shadowBlur: Theme.elevation.medium.blur
shadowVerticalOffset: 2
Rectangle {
id: shadow
x: surface.offset
y: surface.offset
width: surface.width
height: surface.height
color: surface.edgeColor
visible: !surface.pressed
}
Rectangle {
id: face
x: surface.pressed ? surface.offset : 0
y: surface.pressed ? surface.offset : 0
width: surface.width
height: surface.height
color: Theme.colors.background
border.width: Theme.geometry.borderWidth
border.color: surface.edgeColor
Behavior on x { NumberAnimation { duration: Theme.animation.durationFast; easing.type: Easing.Linear } }
Behavior on y { NumberAnimation { duration: Theme.animation.durationFast; easing.type: Easing.Linear } }
}
}