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:
|
property int calculatedMinimumSize:
|
||||||
requireDefaultSize ? defaultSize : minimumSize
|
requireDefaultSize ? defaultSize : minimumSize
|
||||||
|
|
||||||
|
readonly property int calculatedSizeNoRequiredMinimum:
|
||||||
|
collapse ?
|
||||||
|
peekSizeWhileCollapsed :
|
||||||
|
Math.max(minimumSize, Math.min(preferredSize, maximumSize))
|
||||||
|
|
||||||
readonly property int calculatedSize:
|
readonly property int calculatedSize:
|
||||||
collapse ?
|
collapse ?
|
||||||
peekSizeWhileCollapsed :
|
peekSizeWhileCollapsed :
|
||||||
|
|
|
@ -75,14 +75,18 @@ Item {
|
||||||
HLoader {
|
HLoader {
|
||||||
id: loader
|
id: loader
|
||||||
anchors.rightMargin:
|
anchors.rightMargin:
|
||||||
ready && roomPane &&
|
! roomPane ?
|
||||||
|
0 :
|
||||||
|
|
||||||
|
ready &&
|
||||||
! (
|
! (
|
||||||
roomPane.requireDefaultSize &&
|
roomPane.requireDefaultSize &&
|
||||||
roomPane.minimumSize > roomPane.maximumSize &&
|
roomPane.minimumSize > roomPane.maximumSize &&
|
||||||
! roomPane.collapse
|
! roomPane.collapse
|
||||||
) ?
|
) ?
|
||||||
roomPane.visibleSize :
|
roomPane.visibleSize :
|
||||||
0
|
|
||||||
|
roomPane.calculatedSizeNoRequiredMinimum
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: ! (ready && roomPane && roomPane.visibleSize >= chat.width)
|
visible: ! (ready && roomPane && roomPane.visibleSize >= chat.width)
|
||||||
|
|
|
@ -134,7 +134,7 @@ Item {
|
||||||
anchors.leftMargin:
|
anchors.leftMargin:
|
||||||
mainPane.requireDefaultSize &&
|
mainPane.requireDefaultSize &&
|
||||||
mainPane.minimumSize > mainPane.maximumSize ?
|
mainPane.minimumSize > mainPane.maximumSize ?
|
||||||
0 :
|
mainPane.calculatedSizeNoRequiredMinimum :
|
||||||
mainPane.visibleSize
|
mainPane.visibleSize
|
||||||
|
|
||||||
visible: mainPane.visibleSize < mainUI.width
|
visible: mainPane.visibleSize < mainUI.width
|
||||||
|
|
Loading…
Reference in New Issue
Block a user