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:
@@ -279,7 +279,7 @@ Column {
|
||||
scale: delegateItem.dragging ? 1.02 : 1.0
|
||||
transformOrigin: Item.Center
|
||||
radius: delegateItem.dragging ? Theme.cornerRadius + 6 : Theme.cornerRadius
|
||||
color: delegateItem.dragging ? Theme.secondaryContainer : Theme.withAlpha(Theme.surfaceContainer, modelData.enabled ? 0.7 : 0.4)
|
||||
color: itemColor.value
|
||||
border.color: delegateItem.dragging ? Theme.primary : Theme.outlineHeavy
|
||||
border.width: delegateItem.dragging ? 2 : 1
|
||||
|
||||
@@ -295,10 +295,10 @@ Column {
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Theme.shortDuration
|
||||
}
|
||||
DankColorAnimation {
|
||||
id: itemColor
|
||||
to: delegateItem.dragging ? Theme.secondaryContainer : Theme.withAlpha(Theme.surfaceContainer, modelData.enabled ? 0.7 : 0.4)
|
||||
duration: Theme.shortDuration
|
||||
}
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
|
||||
Reference in New Issue
Block a user