Standardize animation durations

This commit is contained in:
miruka 2019-05-14 15:15:10 -04:00
parent 20f8e83a01
commit 2a687f8eee
11 changed files with 23 additions and 12 deletions

View File

@ -47,7 +47,7 @@ Button {
radius: circle ? height : 0
Behavior on color {
ColorAnimation { duration: 60 }
ColorAnimation { duration: HStyle.animationDuration / 2 }
}
Rectangle {
@ -58,7 +58,7 @@ Button {
opacity: 0
Behavior on opacity {
NumberAnimation { duration: 60 }
NumberAnimation { duration: HStyle.animationDuration / 2 }
}
}
}

View File

@ -1,7 +1,7 @@
import QtQuick 2.7
ListView {
property int duration: HStyle.animationDurations
property int duration: HStyle.animationDuration
add: Transition {
NumberAnimation { properties: "x,y"; from: 100; duration: duration }

View File

@ -4,7 +4,7 @@ import QtQuick 2.7
QtObject {
id: style
property int animationDurations: 120
property int animationDuration: 120
readonly property QtObject fontSize: QtObject {
property int smallest: 6

View File

@ -85,7 +85,7 @@ HColumnLayout {
x: roomSidePane.activeView ? 0 : roomSidePane.width
Behavior on x {
NumberAnimation { duration: 120 }
NumberAnimation { duration: HStyle.animationDuration }
}
}

View File

@ -79,7 +79,10 @@ HRectangle {
}
Behavior on Layout.preferredWidth {
NumberAnimation { id: buttonsAnimation; duration: 120 }
NumberAnimation {
id: buttonsAnimation
duration: HStyle.animationDuration
}
}
}
}

View File

@ -16,7 +16,7 @@ HColumnLayout {
bottomMargin: topMargin
Behavior on spacing {
NumberAnimation { duration: 120 }
NumberAnimation { duration: HStyle.animationDuration }
}
model: chatPage.roomInfo.members

View File

@ -71,7 +71,10 @@ Column {
userId: roomCategoriesListUserId
Behavior on height {
NumberAnimation { id: heightAnimation; duration: 100 }
NumberAnimation {
id: heightAnimation;
duration: HStyle.animationDuration
}
}
}
}

View File

@ -15,6 +15,8 @@ HButton {
origin.x: expandButton.iconDimension / 2
origin.y: expandButton.iconDimension / 2
angle: expandableItem.expanded ? 90 : 180
Behavior on angle { NumberAnimation { duration: 100 } }
Behavior on angle {
NumberAnimation { duration: HStyle.animationDuration }
}
}
}

View File

@ -44,7 +44,10 @@ Column {
category: name
Behavior on height {
NumberAnimation { id: heightAnimation; duration: 100 }
NumberAnimation {
id: heightAnimation
duration: HStyle.animationDuration
}
}
}
}

View File

@ -21,7 +21,7 @@ HRectangle {
Layout.leftMargin: spacing
Behavior on spacing {
NumberAnimation { duration: 120 }
NumberAnimation { duration: HStyle.animationDuration }
}
}

View File

@ -48,7 +48,7 @@ Item {
duration:
(uiSplitView.canAutoSize &&
parent.width * 0.3 < sidePane.collapseBelow * 1.2) ?
120 : 0
HStyle.animationDuration : 0
}
}
}