feat: wallpaper-driven theming + native wallpaper picker
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ZYoSQwwYWhJHLX6VBCGnF
This commit is contained in:
1 parent
c1f4bdb80c
commit
3a299fccaf
22 files changed
+594
-285
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import "."
|
||||
|
||||
Rectangle {
|
||||
@@ -9,6 +10,8 @@ Rectangle {
|
||||
property string text: ""
|
||||
signal clicked()
|
||||
|
||||
// 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
|
||||
: variant === "destructive" ? Theme.colors.alert
|
||||
@@ -17,13 +20,22 @@ Rectangle {
|
||||
implicitWidth: label.implicitWidth + Theme.geometry.padding * 2
|
||||
implicitHeight: label.implicitHeight + Theme.geometry.padding
|
||||
|
||||
radius: Theme.geometry.radius
|
||||
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: 0.5
|
||||
shadowBlur: 0.6
|
||||
shadowVerticalOffset: 2
|
||||
}
|
||||
|
||||
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
|
||||
Behavior on scale { SpringAnimation { spring: 4; damping: 0.3 } }
|
||||
scale: mouseArea.pressed ? 0.97 : 1.0
|
||||
|
||||
Reference in new issue
Block a user