mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Properly set position of resize handler after letting it go
fixes #817 fixes sidebar not staying small after restart
This commit is contained in:
parent
5c1cc7d5c6
commit
d36ba00ff6
2 changed files with 7 additions and 4 deletions
|
@ -85,7 +85,9 @@ Rectangle {
|
||||||
id: roomListC
|
id: roomListC
|
||||||
|
|
||||||
minimumWidth: roomlist.avatarSize * 4 + Nheko.paddingSmall * 2
|
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
|
maximumWidth: roomlist.avatarSize * 10 + Nheko.paddingSmall * 2
|
||||||
collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium
|
collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,6 @@ Container {
|
||||||
return (collapsible && x < minimumWidth) ? collapsedWidth : x;
|
return (collapsible && x < minimumWidth) ? collapsedWidth : x;
|
||||||
}
|
}
|
||||||
|
|
||||||
//visible: !container.singlePageMode
|
|
||||||
enabled: !container.singlePageMode
|
enabled: !container.singlePageMode
|
||||||
height: container.height
|
height: container.height
|
||||||
width: 1
|
width: 1
|
||||||
|
@ -107,8 +106,10 @@ Container {
|
||||||
margin: container.splitterGrabMargin
|
margin: container.splitterGrabMargin
|
||||||
grabPermissions: PointerHandler.CanTakeOverFromAnything | PointerHandler.ApprovesTakeOverByHandlersOfSameType
|
grabPermissions: PointerHandler.CanTakeOverFromAnything | PointerHandler.ApprovesTakeOverByHandlersOfSameType
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
if (!active)
|
if (!active) {
|
||||||
splitter.parent.preferredWidth = splitter.x;
|
splitter.x = splitter.calculatedWidth;
|
||||||
|
splitter.parent.preferredWidth = splitter.calculatedWidth;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue