diff --git a/harmonyqml/components/Base/HButton.qml b/harmonyqml/components/Base/HButton.qml index 248750f0..755b7214 100644 --- a/harmonyqml/components/Base/HButton.qml +++ b/harmonyqml/components/Base/HButton.qml @@ -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 } } } } diff --git a/harmonyqml/components/Base/HListView.qml b/harmonyqml/components/Base/HListView.qml index a467ba45..dadc84ba 100644 --- a/harmonyqml/components/Base/HListView.qml +++ b/harmonyqml/components/Base/HListView.qml @@ -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 } diff --git a/harmonyqml/components/Base/HStyle.qml b/harmonyqml/components/Base/HStyle.qml index 48f98b20..49524e3d 100644 --- a/harmonyqml/components/Base/HStyle.qml +++ b/harmonyqml/components/Base/HStyle.qml @@ -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 diff --git a/harmonyqml/components/Chat/Chat.qml b/harmonyqml/components/Chat/Chat.qml index 34d0a4bb..954e8567 100644 --- a/harmonyqml/components/Chat/Chat.qml +++ b/harmonyqml/components/Chat/Chat.qml @@ -85,7 +85,7 @@ HColumnLayout { x: roomSidePane.activeView ? 0 : roomSidePane.width Behavior on x { - NumberAnimation { duration: 120 } + NumberAnimation { duration: HStyle.animationDuration } } } diff --git a/harmonyqml/components/Chat/RoomHeader.qml b/harmonyqml/components/Chat/RoomHeader.qml index 2e36cd6e..22cddfc9 100644 --- a/harmonyqml/components/Chat/RoomHeader.qml +++ b/harmonyqml/components/Chat/RoomHeader.qml @@ -79,7 +79,10 @@ HRectangle { } Behavior on Layout.preferredWidth { - NumberAnimation { id: buttonsAnimation; duration: 120 } + NumberAnimation { + id: buttonsAnimation + duration: HStyle.animationDuration + } } } } diff --git a/harmonyqml/components/Chat/RoomSidePane/MembersView.qml b/harmonyqml/components/Chat/RoomSidePane/MembersView.qml index c3b8da4b..2405a395 100644 --- a/harmonyqml/components/Chat/RoomSidePane/MembersView.qml +++ b/harmonyqml/components/Chat/RoomSidePane/MembersView.qml @@ -16,7 +16,7 @@ HColumnLayout { bottomMargin: topMargin Behavior on spacing { - NumberAnimation { duration: 120 } + NumberAnimation { duration: HStyle.animationDuration } } model: chatPage.roomInfo.members diff --git a/harmonyqml/components/SidePane/AccountDelegate.qml b/harmonyqml/components/SidePane/AccountDelegate.qml index 2c8bd6d4..70c24631 100644 --- a/harmonyqml/components/SidePane/AccountDelegate.qml +++ b/harmonyqml/components/SidePane/AccountDelegate.qml @@ -71,7 +71,10 @@ Column { userId: roomCategoriesListUserId Behavior on height { - NumberAnimation { id: heightAnimation; duration: 100 } + NumberAnimation { + id: heightAnimation; + duration: HStyle.animationDuration + } } } } diff --git a/harmonyqml/components/SidePane/ExpandButton.qml b/harmonyqml/components/SidePane/ExpandButton.qml index 8565e6ce..d140e4c1 100644 --- a/harmonyqml/components/SidePane/ExpandButton.qml +++ b/harmonyqml/components/SidePane/ExpandButton.qml @@ -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 } + } } } diff --git a/harmonyqml/components/SidePane/RoomCategoryDelegate.qml b/harmonyqml/components/SidePane/RoomCategoryDelegate.qml index 853ebffc..776f56c2 100644 --- a/harmonyqml/components/SidePane/RoomCategoryDelegate.qml +++ b/harmonyqml/components/SidePane/RoomCategoryDelegate.qml @@ -44,7 +44,10 @@ Column { category: name Behavior on height { - NumberAnimation { id: heightAnimation; duration: 100 } + NumberAnimation { + id: heightAnimation + duration: HStyle.animationDuration + } } } } diff --git a/harmonyqml/components/SidePane/SidePane.qml b/harmonyqml/components/SidePane/SidePane.qml index 2d276893..c6f9a20b 100644 --- a/harmonyqml/components/SidePane/SidePane.qml +++ b/harmonyqml/components/SidePane/SidePane.qml @@ -21,7 +21,7 @@ HRectangle { Layout.leftMargin: spacing Behavior on spacing { - NumberAnimation { duration: 120 } + NumberAnimation { duration: HStyle.animationDuration } } } diff --git a/harmonyqml/components/UI.qml b/harmonyqml/components/UI.qml index e5d412e1..adb54d22 100644 --- a/harmonyqml/components/UI.qml +++ b/harmonyqml/components/UI.qml @@ -48,7 +48,7 @@ Item { duration: (uiSplitView.canAutoSize && parent.width * 0.3 < sidePane.collapseBelow * 1.2) ? - 120 : 0 + HStyle.animationDuration : 0 } } }