From 9f4aadfd837d4e6fb96e53ff4da7e44343f78c3d Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 16 Jul 2019 09:27:38 -0400 Subject: [PATCH] Reduce (make invisible) pane if window too small --- src/qml/SidePane/SidePane.qml | 2 +- src/qml/UI.qml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qml/SidePane/SidePane.qml b/src/qml/SidePane/SidePane.qml index f1eade5f..cf05c28c 100644 --- a/src/qml/SidePane/SidePane.qml +++ b/src/qml/SidePane/SidePane.qml @@ -8,7 +8,7 @@ import "../Base" HRectangle { id: sidePane clip: true // Avoid artifacts when collapsed - visible: mainUI.accountsPresent + visible: mainUI.accountsPresent && width > 0 property bool canAutoSize: true diff --git a/src/qml/UI.qml b/src/qml/UI.qml index 7ba6d785..78acdd5e 100644 --- a/src/qml/UI.qml +++ b/src/qml/UI.qml @@ -41,8 +41,10 @@ Item { canAutoSize: uiSplitView.canAutoSize width: implicitWidth // Initial width - Layout.minimumWidth: theme.sidePane.collapsedWidth Layout.maximumWidth: parent.width + Layout.minimumWidth: reduce ? 0 : theme.sidePane.collapsedWidth + + Behavior on Layout.minimumWidth { HNumberAnimation {} } } StackView {