Skip to content
Snippets Groups Projects
Verified Commit d36ba00f authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Properly set position of resize handler after letting it go

fixes #817
fixes sidebar not staying small after restart
parent 5c1cc7d5
No related branches found
No related tags found
No related merge requests found
Pipeline #2251 passed
......@@ -85,7 +85,9 @@ Rectangle {
id: roomListC
minimumWidth: roomlist.avatarSize * 4 + Nheko.paddingSmall * 2
preferredWidth: Settings.roomListWidth >= minimumWidth ? Settings.roomListWidth : roomlist.avatarSize * 5 + Nheko.paddingSmall * 2
preferredWidth: (Settings.roomListWidth == - 1)
? (roomlist.avatarSize * 5 + Nheko.paddingSmall * 2)
: (Settings.roomListWidth >= minimumWidth ? Settings.roomListWidth : collapsedWidth)
maximumWidth: roomlist.avatarSize * 10 + Nheko.paddingSmall * 2
collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium
......
......@@ -82,7 +82,6 @@ Container {
return (collapsible && x < minimumWidth) ? collapsedWidth : x;
}
//visible: !container.singlePageMode
enabled: !container.singlePageMode
height: container.height
width: 1
......@@ -107,8 +106,10 @@ Container {
margin: container.splitterGrabMargin
grabPermissions: PointerHandler.CanTakeOverFromAnything | PointerHandler.ApprovesTakeOverByHandlersOfSameType
onActiveChanged: {
if (!active)
splitter.parent.preferredWidth = splitter.x;
if (!active) {
splitter.x = splitter.calculatedWidth;
splitter.parent.preferredWidth = splitter.calculatedWidth;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment