From b7cd08f66b27f69dcec1607a6345deef3a643843 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 14 Jul 2020 03:56:58 -0400 Subject: [PATCH] Fix panes being shown as overlay in "mobile mode" --- src/gui/Pages/Chat/Chat.qml | 11 +++++++---- src/gui/UI.qml | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gui/Pages/Chat/Chat.qml b/src/gui/Pages/Chat/Chat.qml index c614e4c4..0274122a 100644 --- a/src/gui/Pages/Chat/Chat.qml +++ b/src/gui/Pages/Chat/Chat.qml @@ -75,21 +75,24 @@ Item { HLoader { id: loader anchors.rightMargin: - ready && + ready && roomPane && ! ( roomPane.requireDefaultSize && - roomPane.minimumSize > roomPane.maximumSize + roomPane.minimumSize > roomPane.maximumSize && + ! roomPane.collapse ) ? roomPane.visibleSize : 0 anchors.fill: parent - visible: - ready ? ! roomPane.hidden || anchors.rightMargin < width : true + visible: ! (ready && roomPane && roomPane.visibleSize >= chat.width) + onLoaded: if (chat.focus) item.composer.takeFocus() source: ready ? "ChatPage.qml" : "" + Behavior on anchors.rightMargin { HNumberAnimation {} } + HLoader { anchors.centerIn: parent width: 96 * theme.uiScale diff --git a/src/gui/UI.qml b/src/gui/UI.qml index 3f1354c4..25906f5d 100644 --- a/src/gui/UI.qml +++ b/src/gui/UI.qml @@ -134,9 +134,9 @@ Item { anchors.leftMargin: mainPane.requireDefaultSize && mainPane.minimumSize > mainPane.maximumSize ? - theme.mainPane.minimumSize : + 0 : mainPane.visibleSize - visible: ! mainPane.hidden || anchors.leftMargin < width + visible: mainPane.visibleSize < mainUI.width } }