From 5e3a621f8b23e82ea5b84424c03cd4a37055cabe Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 15 Dec 2019 15:10:50 -0400 Subject: [PATCH] Respect uiScale for panes --- TODO.md | 1 + src/qml/Base/HDrawer.qml | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index c3e84581..380938ee 100644 --- a/TODO.md +++ b/TODO.md @@ -91,6 +91,7 @@ - Expand the room pane if it's too small to show room settings? - Drop the `buttonModel`/`buttonCallbacks` HBox approach - Scrollable popups and room settings +- Improve when HDrawer should collapse when the ui is zoomed - HDrawer snapping - Make theme error/etc text colors more like name colors - In account settings, display name field text should be colored diff --git a/src/qml/Base/HDrawer.qml b/src/qml/Base/HDrawer.qml index d2d7caac..9d8a8364 100644 --- a/src/qml/Base/HDrawer.qml +++ b/src/qml/Base/HDrawer.qml @@ -4,8 +4,8 @@ import "../utils.js" as Utils Drawer { id: drawer - implicitWidth: horizontal ? calculatedSize : parent.width - implicitHeight: vertical ? calculatedSize : parent.height + implicitWidth: horizontal ? calculatedSize * theme.uiScale : parent.width + implicitHeight: vertical ? calculatedSize * theme.uiScale : 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 @@ -52,7 +52,8 @@ Drawer { property Item referenceSizeParent: parent property bool collapse: - (horizontal ? window.width : window.height) < 400 + (horizontal ? window.width : window.height) < 400 * theme.uiScale + property int peekSizeWhileCollapsed: horizontal ? referenceSizeParent.width : referenceSizeParent.height @@ -87,8 +88,8 @@ Drawer { id: resizeArea x: vertical || drawer.edge === Qt.RightEdge ? 0 : drawer.width-width y: horizontal || drawer.edge !== Qt.TopEdge ? 0 : drawer.height-height - width: horizontal ? resizeAreaSize : parent.width - height: vertical ? resizeAreaSize : parent.height + width: horizontal ? resizeAreaSize * theme.uiScale : parent.width + height: vertical ? resizeAreaSize * theme.uiScale : parent.height z: 999 MouseArea {