feat: complete quickshell redesign

This commit is contained in:
johannes committed 2026-09-21 16:16:35 +02:00
1 parent 1eb0820083
commit 0ff727898a
25 files changed
+1410 -401

No files matched your search

@@ -1,54 +1,46 @@
import QtQuick
import QtQuick.Effects
import "."
// Bar-style pill chrome: rounded surface, border, optional colored glow.
// Children are centered in an internal Row - place them directly as this
// component's children, same as putting them in a Row.
Rectangle {
// Status chip / telemetry badge: sharp corners, 2px border, a tight 2px
// offset shadow (deliberately smaller than Surface's, per DESIGN.md's
// "Status Chips & Telemetry Badges" spec). Children are centered in an
// internal Row - place them directly as this component's children, same as
// putting them in a Row.
Item {
id: pill
property color tint: Theme.colors.border
property color tint: Theme.colors.outlineVariant
property bool glow: false
// How strongly `tint` is mixed into the base surface color, so each
// pill reads as its own tinted background instead of one flat surface
// color with only the border/glow varying.
property real tintStrength: 0.35
default property alias content: contentRow.data
function blend(base, mix, amount) {
return Qt.rgba(
base.r + (mix.r - base.r) * amount,
base.g + (mix.g - base.g) * amount,
base.b + (mix.b - base.b) * amount,
base.a
);
}
readonly property color edgeColor: glow ? tint : Theme.colors.crust
readonly property int offset: 2
implicitWidth: contentRow.implicitWidth + Theme.geometry.padding * 2
implicitHeight: contentRow.implicitHeight + Theme.geometry.padding
implicitWidth: contentRow.implicitWidth + Theme.geometry.padding * 2 + offset
implicitHeight: contentRow.implicitHeight + Theme.geometry.spacing + offset
height: implicitHeight
radius: Theme.geometry.pillRadius
color: blend(Theme.colors.surface, tint, tintStrength)
border.color: tint
border.width: 1
Behavior on color { ColorAnimation { duration: Theme.animation.durationNormal } }
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
layer.enabled: glow
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: pill.tint
shadowOpacity: Theme.elevation.low.opacity
shadowBlur: Theme.elevation.low.blur
shadowVerticalOffset: 1
Rectangle {
x: pill.offset
y: pill.offset
width: pill.width - pill.offset
height: pill.height - pill.offset
color: pill.edgeColor
}
Row {
id: contentRow
anchors.centerIn: parent
spacing: Theme.geometry.spacing
Rectangle {
width: pill.width - pill.offset
height: pill.height - pill.offset
color: Theme.colors.surface
border.width: Theme.geometry.borderWidth
border.color: pill.edgeColor
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
Row {
id: contentRow
anchors.centerIn: parent
spacing: Theme.geometry.spacing
}
}
}