Auto-expand main pane when filter field focused

This commit is contained in:
miruka 2020-07-14 03:31:01 -04:00
parent f84b13c657
commit 645350f199
2 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,7 @@ HDrawer {
saveName: "mainPane" saveName: "mainPane"
background: Rectangle { color: theme.mainPane.background } background: Rectangle { color: theme.mainPane.background }
minimumSize: requireDefaultSize ? defaultSize : theme.mainPane.minimumSize minimumSize: requireDefaultSize ? defaultSize : theme.mainPane.minimumSize
requireDefaultSize: bottomBar.filterField.activeFocus
Behavior on opacity { HNumberAnimation {} } Behavior on opacity { HNumberAnimation {} }

View File

@ -131,7 +131,12 @@ Item {
PageLoader { PageLoader {
id: pageLoader id: pageLoader
anchors.fill: parent 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 visible: ! mainPane.hidden || anchors.leftMargin < width
} }
} }