diff --git a/harmonyqml/components/Chat/RoomHeader.qml b/harmonyqml/components/Chat/RoomHeader.qml index c5ea8bcc..6c509be0 100644 --- a/harmonyqml/components/Chat/RoomHeader.qml +++ b/harmonyqml/components/Chat/RoomHeader.qml @@ -78,7 +78,7 @@ HRectangle { } Behavior on Layout.maximumWidth { - NumberAnimation { id: buttonsAnimation; duration: 150 } + NumberAnimation { id: buttonsAnimation; duration: 120 } } } } diff --git a/harmonyqml/components/Chat/RoomSidePane/MembersView.qml b/harmonyqml/components/Chat/RoomSidePane/MembersView.qml index 86187655..48e8f710 100644 --- a/harmonyqml/components/Chat/RoomSidePane/MembersView.qml +++ b/harmonyqml/components/Chat/RoomSidePane/MembersView.qml @@ -21,7 +21,7 @@ Column { bottomMargin: topMargin Behavior on spacing { - NumberAnimation { duration: 150 } + NumberAnimation { duration: 120 } } model: chatPage.roomInfo.members diff --git a/harmonyqml/components/SidePane/SidePane.qml b/harmonyqml/components/SidePane/SidePane.qml index fa882eed..2d276893 100644 --- a/harmonyqml/components/SidePane/SidePane.qml +++ b/harmonyqml/components/SidePane/SidePane.qml @@ -21,17 +21,10 @@ HRectangle { Layout.leftMargin: spacing Behavior on spacing { - NumberAnimation { duration: 150 } + NumberAnimation { duration: 120 } } } PaneToolBar {} } - - Behavior on width { - NumberAnimation { - // Don't slow down the user manually resizing - duration: uiSplitView.canAutoSize ? 150 : 0 - } - } } diff --git a/harmonyqml/components/UI.qml b/harmonyqml/components/UI.qml index 246a2217..e5d412e1 100644 --- a/harmonyqml/components/UI.qml +++ b/harmonyqml/components/UI.qml @@ -24,20 +24,33 @@ Item { anchors.fill: parent SidePane { + id: sidePane visible: accountsLoggedIn collapsed: width < Layout.minimumWidth + normalSpacing + property int parentWidth: parent.width + property int collapseBelow: 120 + function set_width() { - width = parent.width * 0.3 < 120 ? + width = parent.width * 0.3 < collapseBelow ? Layout.minimumWidth : Math.min(parent.width * 0.3, 300) } - property int parentWidth: parent.width onParentWidthChanged: if (uiSplitView.canAutoSize) { set_width() } width: set_width() // Initial width Layout.minimumWidth: HStyle.avatar.size Layout.maximumWidth: parent.width + + Behavior on width { + NumberAnimation { + // Don't slow down the user manually resizing + duration: + (uiSplitView.canAutoSize && + parent.width * 0.3 < sidePane.collapseBelow * 1.2) ? + 120 : 0 + } + } } StackView {