forked from Shinonome/dots-hyprland
nicer(?) calendar collapse fade
or at least more correct idk
This commit is contained in:
@@ -188,6 +188,18 @@ Singleton {
|
|||||||
property list<real> bezierCurve: animationCurves.emphasized
|
property list<real> bezierCurve: animationCurves.emphasized
|
||||||
property int velocity: 650
|
property int velocity: 650
|
||||||
}
|
}
|
||||||
|
property QtObject elementMoveEnter: QtObject {
|
||||||
|
property int duration: 400
|
||||||
|
property int type: Easing.BezierSpline
|
||||||
|
property list<real> bezierCurve: animationCurves.emphasizedDecel
|
||||||
|
property int velocity: 650
|
||||||
|
}
|
||||||
|
property QtObject elementMoveExit: QtObject {
|
||||||
|
property int duration: 200
|
||||||
|
property int type: Easing.BezierSpline
|
||||||
|
property list<real> bezierCurve: animationCurves.emphasizedAccel
|
||||||
|
property int velocity: 650
|
||||||
|
}
|
||||||
property QtObject elementMoveFast: QtObject {
|
property QtObject elementMoveFast: QtObject {
|
||||||
property int duration: 200
|
property int duration: 200
|
||||||
property int type: Easing.BezierSpline
|
property int type: Easing.BezierSpline
|
||||||
|
|||||||
@@ -36,8 +36,16 @@ Rectangle {
|
|||||||
|
|
||||||
function setCollapsed(state) {
|
function setCollapsed(state) {
|
||||||
collapsed = state
|
collapsed = state
|
||||||
if (collapsed) bottomWidgetGroupRow.opacity = 0
|
if (collapsed) {
|
||||||
else collapsedBottomWidgetGroupRow.opacity = 0
|
bottomWidgetGroupRowFade.easing.bezierCurve = Appearance.animation.elementMoveExit.bezierCurve
|
||||||
|
bottomWidgetGroupRowFade.easing.bezierCurve = Appearance.animation.elementMoveEnter.bezierCurve
|
||||||
|
bottomWidgetGroupRow.opacity = 0
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bottomWidgetGroupRowFade.easing.bezierCurve = Appearance.animation.elementMoveExit.bezierCurve
|
||||||
|
bottomWidgetGroupRowFade.easing.bezierCurve = Appearance.animation.elementMoveEnter.bezierCurve
|
||||||
|
collapsedBottomWidgetGroupRow.opacity = 0
|
||||||
|
}
|
||||||
collapseCleanFadeTimer.start()
|
collapseCleanFadeTimer.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +77,7 @@ Rectangle {
|
|||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
id: collapsedBottomWidgetGroupRowFade
|
||||||
duration: Appearance.animation.elementMove.duration / 2
|
duration: Appearance.animation.elementMove.duration / 2
|
||||||
easing.type: Appearance.animation.elementMove.type
|
easing.type: Appearance.animation.elementMove.type
|
||||||
easing.bezierCurve: Appearance.animation.elementMove.bezierCurve
|
easing.bezierCurve: Appearance.animation.elementMove.bezierCurve
|
||||||
@@ -109,6 +118,7 @@ Rectangle {
|
|||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
id: bottomWidgetGroupRowFade
|
||||||
duration: Appearance.animation.elementMove.duration / 2
|
duration: Appearance.animation.elementMove.duration / 2
|
||||||
easing.type: Appearance.animation.elementMove.type
|
easing.type: Appearance.animation.elementMove.type
|
||||||
easing.bezierCurve: Appearance.animation.elementMove.bezierCurve
|
easing.bezierCurve: Appearance.animation.elementMove.bezierCurve
|
||||||
|
|||||||
Reference in New Issue
Block a user