mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-12 16:52:10 -04:00
dms: Material Animation Refactor
- Thanks Google for Material 3 Expressive stuffs - Thanks Caelestia shell for pushing qml limits to showcase the blueprint
This commit is contained in:
@@ -15,6 +15,8 @@ Rectangle {
|
||||
property color textColor: Theme.buttonText
|
||||
property int buttonHeight: 40
|
||||
property int horizontalPadding: Theme.spacingL
|
||||
property bool enableScaleAnimation: false
|
||||
property bool enableRipple: false
|
||||
|
||||
signal clicked
|
||||
|
||||
@@ -23,6 +25,15 @@ Rectangle {
|
||||
radius: Theme.cornerRadius
|
||||
color: backgroundColor
|
||||
opacity: enabled ? 1 : 0.4
|
||||
scale: (enableScaleAnimation && pressed) ? 0.98 : 1.0
|
||||
|
||||
Behavior on scale {
|
||||
enabled: enableScaleAnimation && Theme.currentAnimationSpeed !== SettingsData.AnimationSpeed.None
|
||||
DankAnim {
|
||||
duration: 100
|
||||
easing.bezierCurve: Theme.expressiveCurves.standard
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: stateLayer
|
||||
|
||||
Reference in New Issue
Block a user