diff --git a/src/gui/Base/HDrawer.qml b/src/gui/Base/HDrawer.qml index df6ea6a8..2428c7fb 100644 --- a/src/gui/Base/HDrawer.qml +++ b/src/gui/Base/HDrawer.qml @@ -49,17 +49,19 @@ Drawer { requireDefaultSize ? defaultSize : minimumSize readonly property int calculatedSizeNoRequiredMinimum: - collapse || forceCollapse ? + normalOrForceCollapse ? peekSizeWhileCollapsed : Math.max(minimumSize, Math.min(preferredSize, maximumSize)) readonly property int calculatedSize: - collapse || forceCollapse ? + normalOrForceCollapse ? peekSizeWhileCollapsed : Math.max(calculatedMinimumSize, Math.min(preferredSize, maximumSize)) // + readonly property bool normalOrForceCollapse: collapse || forceCollapse + readonly property int visibleSize: visible ? width * position : 0 readonly property bool horizontal: @@ -81,7 +83,7 @@ Drawer { // FIXME: https://bugreports.qt.io/browse/QTBUG-59141 // dragMargin: parent.width / 2 - // interactive: collapse || forceCollapse + // interactive: normalOrForceCollapse dragMargin: 0 interactive: false diff --git a/src/gui/Base/HDrawerSwipeHandler.qml b/src/gui/Base/HDrawerSwipeHandler.qml index 37f738fe..dadceee6 100644 --- a/src/gui/Base/HDrawerSwipeHandler.qml +++ b/src/gui/Base/HDrawerSwipeHandler.qml @@ -27,10 +27,7 @@ DragHandler { signal closeRequest() target: null - - enabled: - (drawer.collapse || drawer.forceCollapse) && - drawer.visible + enabled: drawer.normalOrForceCollapse && drawer.visible onTranslationChanged: { if (hide.running || cancel.running) return diff --git a/src/gui/Pages/Chat/RoomHeader.qml b/src/gui/Pages/Chat/RoomHeader.qml index b8fd2c29..9454dafd 100644 --- a/src/gui/Pages/Chat/RoomHeader.qml +++ b/src/gui/Pages/Chat/RoomHeader.qml @@ -26,7 +26,7 @@ Rectangle { RoomHeaderButton { id: goToMainPaneButton - show: mainUI.mainPane.collapse || mainUI.mainPane.forceCollapse + show: mainUI.mainPane.normalOrForceCollapse padded: false backgroundColor: "transparent" icon.name: "go-back-to-main-pane" @@ -216,9 +216,7 @@ Rectangle { RoomHeaderButton { id: goToRoomPaneButton - show: - chat.roomPane && - (chat.roomPane.collapse || chat.roomPane.forceCollapse) + show: chat.roomPane && chat.roomPane.normalOrForceCollapse padded: false backgroundColor: "transparent"