Big improvements on sidepane auto/manual sizing

See gui-tests.md for the expected sidepane behaviors.
This commit is contained in:
miruka
2019-07-17 13:34:02 -04:00
parent e173253f74
commit 332b6f1c0d
9 changed files with 108 additions and 36 deletions

View File

@@ -116,8 +116,8 @@ HPage {
property bool wasSnapped: false
property int referenceWidth: roomHeader.buttonsWidth
onReferenceWidthChanged: {
if (chatSplitView.canAutoSize || wasSnapped) {
if (wasSnapped) { chatSplitView.canAutoSize = true }
if (! chatSplitView.manuallyResized || wasSnapped) {
if (wasSnapped) { chatSplitView.manuallyResized = false }
width = referenceWidth
}
}
@@ -141,7 +141,8 @@ HPage {
width: referenceWidth // Initial width
Layout.minimumWidth: theme.avatar.size
Layout.maximumWidth: parent.width
Layout.maximumWidth:
parent.width - theme.minimumSupportedWidthPlusSpacing
}
}
}