From 645350f1999d917a459f928bede2c85440093b10 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 14 Jul 2020 03:31:01 -0400 Subject: [PATCH] Auto-expand main pane when filter field focused --- src/gui/MainPane/MainPane.qml | 1 + src/gui/UI.qml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/MainPane/MainPane.qml b/src/gui/MainPane/MainPane.qml index 43e0e6b4..836d5d18 100644 --- a/src/gui/MainPane/MainPane.qml +++ b/src/gui/MainPane/MainPane.qml @@ -25,6 +25,7 @@ HDrawer { saveName: "mainPane" background: Rectangle { color: theme.mainPane.background } minimumSize: requireDefaultSize ? defaultSize : theme.mainPane.minimumSize + requireDefaultSize: bottomBar.filterField.activeFocus Behavior on opacity { HNumberAnimation {} } diff --git a/src/gui/UI.qml b/src/gui/UI.qml index 73e670ea..3f1354c4 100644 --- a/src/gui/UI.qml +++ b/src/gui/UI.qml @@ -131,7 +131,12 @@ Item { PageLoader { id: pageLoader anchors.fill: parent - anchors.leftMargin: mainPane.visibleSize + anchors.leftMargin: + mainPane.requireDefaultSize && + mainPane.minimumSize > mainPane.maximumSize ? + theme.mainPane.minimumSize : + mainPane.visibleSize + visible: ! mainPane.hidden || anchors.leftMargin < width } }