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,8 +1,7 @@
import QtQuick
import QtQuick.Effects
import "."
Rectangle {
Surface {
id: button
// "primary" | "secondary" | "accent" | "destructive" | "success" | "warning" | "info"
@@ -13,7 +12,7 @@ Rectangle {
// primary and accent are the same color (Theme.colors.primary === .accent);
// kept as separate variant names for call-site clarity.
readonly property bool filled: variant === "primary" || variant === "accent"
readonly property color tint: variant === "accent" ? Theme.colors.accent
readonly property color variantColor: variant === "accent" ? Theme.colors.accent
: variant === "destructive" ? Theme.colors.alert
: variant === "success" ? Theme.colors.success
: variant === "warning" ? Theme.colors.warning
@@ -22,35 +21,27 @@ Rectangle {
implicitWidth: label.implicitWidth + Theme.geometry.padding * 2
implicitHeight: label.implicitHeight + Theme.geometry.padding
width: implicitWidth
height: implicitHeight
radius: Theme.geometry.radiusSmall
color: filled
? (mouseArea.pressed ? Qt.darker(tint, 1.1) : tint)
: (mouseArea.containsMouse ? Qt.alpha(tint, 0.22) : Qt.alpha(tint, 0.15))
border.width: filled ? 0 : 1
border.color: Qt.alpha(tint, 0.3)
layer.enabled: filled
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: button.tint
shadowOpacity: Theme.elevation.medium.opacity
shadowBlur: Theme.elevation.medium.blur
shadowVerticalOffset: 2
}
? (mouseArea.containsMouse ? Qt.lighter(variantColor, 1.15) : variantColor)
: (mouseArea.containsMouse ? Theme.colors.surfaceHover : Theme.colors.surface)
tint: variantColor
glow: !filled && mouseArea.containsMouse
pressed: mouseArea.pressed
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
Behavior on scale { SpringAnimation { spring: Theme.motion.springSnappy.spring; damping: Theme.motion.springSnappy.damping } }
scale: mouseArea.pressed ? 0.97 : 1.0
Text {
id: label
anchors.centerIn: parent
text: button.text
font.family: Theme.font.family
font.pixelSize: 13
font.family: Theme.font.headlineFamily
font.pixelSize: 14
font.bold: true
color: button.filled ? Theme.colors.background : button.tint
font.capitalization: Font.AllUppercase
color: button.filled ? Theme.colors.textOnAccent : button.variantColor
}
MouseArea {