Fix panes being shown as overlay in "mobile mode"

This commit is contained in:
miruka 2020-07-14 03:56:58 -04:00
parent 645350f199
commit b7cd08f66b
2 changed files with 9 additions and 6 deletions

View File

@ -75,21 +75,24 @@ Item {
HLoader { HLoader {
id: loader id: loader
anchors.rightMargin: anchors.rightMargin:
ready && ready && roomPane &&
! ( ! (
roomPane.requireDefaultSize && roomPane.requireDefaultSize &&
roomPane.minimumSize > roomPane.maximumSize roomPane.minimumSize > roomPane.maximumSize &&
! roomPane.collapse
) ? ) ?
roomPane.visibleSize : roomPane.visibleSize :
0 0
anchors.fill: parent anchors.fill: parent
visible: visible: ! (ready && roomPane && roomPane.visibleSize >= chat.width)
ready ? ! roomPane.hidden || anchors.rightMargin < width : true
onLoaded: if (chat.focus) item.composer.takeFocus() onLoaded: if (chat.focus) item.composer.takeFocus()
source: ready ? "ChatPage.qml" : "" source: ready ? "ChatPage.qml" : ""
Behavior on anchors.rightMargin { HNumberAnimation {} }
HLoader { HLoader {
anchors.centerIn: parent anchors.centerIn: parent
width: 96 * theme.uiScale width: 96 * theme.uiScale

View File

@ -134,9 +134,9 @@ Item {
anchors.leftMargin: anchors.leftMargin:
mainPane.requireDefaultSize && mainPane.requireDefaultSize &&
mainPane.minimumSize > mainPane.maximumSize ? mainPane.minimumSize > mainPane.maximumSize ?
theme.mainPane.minimumSize : 0 :
mainPane.visibleSize mainPane.visibleSize
visible: ! mainPane.hidden || anchors.leftMargin < width visible: mainPane.visibleSize < mainUI.width
} }
} }