Reduce (make invisible) pane if window too small

This commit is contained in:
miruka 2019-07-16 09:27:38 -04:00
parent 797d63b988
commit 9f4aadfd83
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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 {