Improve HDrawer complience/behavior with zoom

This commit is contained in:
miruka
2019-12-26 11:09:40 -04:00
parent fc7f7256a1
commit 35fd57be56
3 changed files with 4 additions and 7 deletions

View File

@@ -5,8 +5,8 @@ import QtQuick.Controls 2.12
Drawer {
id: drawer
implicitWidth: horizontal ? calculatedSize * theme.uiScale : parent.width
implicitHeight: vertical ? calculatedSize * theme.uiScale : parent.height
implicitWidth: horizontal ? calculatedSize : parent.width
implicitHeight: vertical ? calculatedSize : parent.height
// Prevents this: open a popup, make the window small enough for the
// drawer to collapse, then make it big again → popup is now behind drawer
@@ -37,7 +37,7 @@ Drawer {
property alias color: bg.color
property int defaultSize: 300
property int defaultSize: 300 * theme.uiScale
property int preferredSize:
window.getState(this, "preferredSize", defaultSize)

View File

@@ -41,6 +41,7 @@ HTileDelegate {
Behavior on spacing { HNumberAnimation {} }
Binding on spacing {
id: spacebind
value: (roomPane.minimumSize - loadedImage.width) / 2
when: loadedImage &&
roomPane.width < loadedImage.width + theme.spacing * 2