diff --git a/src/gui/Base/HDrawer.qml b/src/gui/Base/HDrawer.qml index 11bbb6fc..b93bc6eb 100644 --- a/src/gui/Base/HDrawer.qml +++ b/src/gui/Base/HDrawer.qml @@ -43,6 +43,11 @@ Drawer { property int calculatedMinimumSize: requireDefaultSize ? defaultSize : minimumSize + readonly property int calculatedSizeNoRequiredMinimum: + collapse ? + peekSizeWhileCollapsed : + Math.max(minimumSize, Math.min(preferredSize, maximumSize)) + readonly property int calculatedSize: collapse ? peekSizeWhileCollapsed : diff --git a/src/gui/Pages/Chat/Chat.qml b/src/gui/Pages/Chat/Chat.qml index 0274122a..ee824568 100644 --- a/src/gui/Pages/Chat/Chat.qml +++ b/src/gui/Pages/Chat/Chat.qml @@ -75,14 +75,18 @@ Item { HLoader { id: loader anchors.rightMargin: - ready && roomPane && + ! roomPane ? + 0 : + + ready && ! ( roomPane.requireDefaultSize && roomPane.minimumSize > roomPane.maximumSize && ! roomPane.collapse ) ? roomPane.visibleSize : - 0 + + roomPane.calculatedSizeNoRequiredMinimum anchors.fill: parent visible: ! (ready && roomPane && roomPane.visibleSize >= chat.width) diff --git a/src/gui/UI.qml b/src/gui/UI.qml index 25906f5d..3840018f 100644 --- a/src/gui/UI.qml +++ b/src/gui/UI.qml @@ -134,7 +134,7 @@ Item { anchors.leftMargin: mainPane.requireDefaultSize && mainPane.minimumSize > mainPane.maximumSize ? - 0 : + mainPane.calculatedSizeNoRequiredMinimum : mainPane.visibleSize visible: mainPane.visibleSize < mainUI.width