Don't change chat width when showing overlay panes
When auto-expanding a pane and showing it as an overlay because of narrow window, make the chat keep the width it had before. This makes the transition less jarring, reduces the amount of text seen through a transparent pane, and fix making one pane overlay expanding the other.
This commit is contained in:
parent
e76143c172
commit
c00e35a948
@ -43,6 +43,11 @@ Drawer {
|
||||
property int calculatedMinimumSize:
|
||||
requireDefaultSize ? defaultSize : minimumSize
|
||||
|
||||
readonly property int calculatedSizeNoRequiredMinimum:
|
||||
collapse ?
|
||||
peekSizeWhileCollapsed :
|
||||
Math.max(minimumSize, Math.min(preferredSize, maximumSize))
|
||||
|
||||
readonly property int calculatedSize:
|
||||
collapse ?
|
||||
peekSizeWhileCollapsed :
|
||||
|
@ -75,14 +75,18 @@ Item {
|
||||
HLoader {
|
||||
id: loader
|
||||
anchors.rightMargin:
|
||||
ready && roomPane &&
|
||||
! roomPane ?
|
||||
0 :
|
||||
|
||||
ready &&
|
||||
! (
|
||||
roomPane.requireDefaultSize &&
|
||||
roomPane.minimumSize > roomPane.maximumSize &&
|
||||
! roomPane.collapse
|
||||
) ?
|
||||
roomPane.visibleSize :
|
||||
0
|
||||
|
||||
roomPane.calculatedSizeNoRequiredMinimum
|
||||
|
||||
anchors.fill: parent
|
||||
visible: ! (ready && roomPane && roomPane.visibleSize >= chat.width)
|
||||
|
@ -134,7 +134,7 @@ Item {
|
||||
anchors.leftMargin:
|
||||
mainPane.requireDefaultSize &&
|
||||
mainPane.minimumSize > mainPane.maximumSize ?
|
||||
0 :
|
||||
mainPane.calculatedSizeNoRequiredMinimum :
|
||||
mainPane.visibleSize
|
||||
|
||||
visible: mainPane.visibleSize < mainUI.width
|
||||
|
Loading…
Reference in New Issue
Block a user