1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 04:58:30 -04:00

animations: add DankColorAnimation helper to properly animate between

colors with different alpha values
fixes #2720
This commit is contained in:
bbedward
2026-07-03 15:36:45 -04:00
parent 3253adb6dd
commit 930a36bcfc
7 changed files with 95 additions and 41 deletions
@@ -1,7 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import qs.Common
import qs.Services
import qs.Widgets
@@ -319,13 +318,13 @@ FocusScope {
Rectangle {
anchors.fill: parent
radius: height / 2
color: categoryChip.isSelected ? Theme.primary : chipArea.containsMouse ? Theme.surfaceHover : Theme.surfaceVariantAlpha
color: chipColor.value
Behavior on color {
ColorAnimation {
duration: root._fastDuration
easing.type: Theme.standardEasing
}
DankColorAnimation {
id: chipColor
to: categoryChip.isSelected ? Theme.primary : chipArea.containsMouse ? Theme.surfaceHover : Theme.surfaceVariantAlpha
duration: root._fastDuration
easingType: Theme.standardEasing
}
StyledText {