forked from Shinonome/dots-hyprland
refractor elementMoveEnter anims
This commit is contained in:
@@ -223,6 +223,13 @@ Singleton {
|
|||||||
property int type: Easing.BezierSpline
|
property int type: Easing.BezierSpline
|
||||||
property list<real> bezierCurve: animationCurves.emphasizedAccel
|
property list<real> bezierCurve: animationCurves.emphasizedAccel
|
||||||
property int velocity: 650
|
property int velocity: 650
|
||||||
|
property Component numberAnimation: Component {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: root.animation.elementMoveExit.duration
|
||||||
|
easing.type: root.animation.elementMoveExit.type
|
||||||
|
easing.bezierCurve: root.animation.elementMoveExit.bezierCurve
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
property QtObject elementMoveFast: QtObject {
|
property QtObject elementMoveFast: QtObject {
|
||||||
property int duration: 200
|
property int duration: 200
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ Item {
|
|||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
enabled: !vertical
|
enabled: !vertical
|
||||||
animation: Appearance.animation.elementMoveEnter.numberAnimation
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
enabled: vertical
|
enabled: vertical
|
||||||
animation: Appearance.animation.elementMoveEnter.numberAnimation
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,7 @@ ProgressBar {
|
|||||||
property real valueBarGap: 4
|
property real valueBarGap: 4
|
||||||
|
|
||||||
Behavior on value {
|
Behavior on value {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|||||||
@@ -52,18 +52,10 @@ Item {
|
|||||||
rotation: 180 * (root.rotateIcon ? value : 0)
|
rotation: 180 * (root.rotateIcon ? value : 0)
|
||||||
|
|
||||||
Behavior on iconSize {
|
Behavior on iconSize {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Behavior on rotation {
|
Behavior on rotation {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,32 +47,16 @@ Rectangle { // Window
|
|||||||
border.width : 1
|
border.width : 1
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Behavior on y {
|
Behavior on y {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -88,11 +72,7 @@ Rectangle { // Window
|
|||||||
implicitSize: Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio)
|
implicitSize: Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio)
|
||||||
|
|
||||||
Behavior on implicitSize {
|
Behavior on implicitSize {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
|
|||||||
@@ -179,22 +179,18 @@ int main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
NumberAnimation {
|
animations: [Appearance.animation.elementMoveEnter.numberAnimation.createObject(this, {
|
||||||
property: "opacity"
|
property: "opacity",
|
||||||
from: 0; to: 1
|
from: 0,
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
to: 1
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
})]
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
remove: Transition {
|
remove: Transition {
|
||||||
NumberAnimation {
|
animations: [Appearance.animation.elementMoveEnter.numberAnimation.createObject(this, {
|
||||||
property: "opacity"
|
property: "opacity",
|
||||||
from: 1; to: 0
|
from: 1,
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
to: 0
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
})]
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model: ScriptModel {
|
model: ScriptModel {
|
||||||
@@ -214,11 +210,7 @@ int main(int argc, char* argv[]) {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|||||||
@@ -174,13 +174,11 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
NumberAnimation {
|
animations: [Appearance.animation.elementMoveEnter.numberAnimation.createObject(this, {
|
||||||
property: "opacity"
|
property: "opacity",
|
||||||
from: 0; to: 1
|
from: 0,
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
to: 1
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
})]
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model: ScriptModel {
|
model: ScriptModel {
|
||||||
@@ -208,11 +206,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -246,11 +240,7 @@ Item {
|
|||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@@ -78,11 +78,7 @@ Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
duration: Appearance.animation.elementMoveEnter.duration
|
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user