Respect uiScale for panes

This commit is contained in:
miruka 2019-12-15 15:10:50 -04:00
parent 52956954e5
commit 5e3a621f8b
2 changed files with 7 additions and 5 deletions

View File

@ -91,6 +91,7 @@
- Expand the room pane if it's too small to show room settings? - Expand the room pane if it's too small to show room settings?
- Drop the `buttonModel`/`buttonCallbacks` HBox approach - Drop the `buttonModel`/`buttonCallbacks` HBox approach
- Scrollable popups and room settings - Scrollable popups and room settings
- Improve when HDrawer should collapse when the ui is zoomed
- HDrawer snapping - HDrawer snapping
- Make theme error/etc text colors more like name colors - Make theme error/etc text colors more like name colors
- In account settings, display name field text should be colored - In account settings, display name field text should be colored

View File

@ -4,8 +4,8 @@ import "../utils.js" as Utils
Drawer { Drawer {
id: drawer id: drawer
implicitWidth: horizontal ? calculatedSize : parent.width implicitWidth: horizontal ? calculatedSize * theme.uiScale : parent.width
implicitHeight: vertical ? calculatedSize : parent.height implicitHeight: vertical ? calculatedSize * theme.uiScale : parent.height
// Prevents this: open a popup, make the window small enough for the // 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 // drawer to collapse, then make it big again popup is now behind drawer
@ -52,7 +52,8 @@ Drawer {
property Item referenceSizeParent: parent property Item referenceSizeParent: parent
property bool collapse: property bool collapse:
(horizontal ? window.width : window.height) < 400 (horizontal ? window.width : window.height) < 400 * theme.uiScale
property int peekSizeWhileCollapsed: property int peekSizeWhileCollapsed:
horizontal ? referenceSizeParent.width : referenceSizeParent.height horizontal ? referenceSizeParent.width : referenceSizeParent.height
@ -87,8 +88,8 @@ Drawer {
id: resizeArea id: resizeArea
x: vertical || drawer.edge === Qt.RightEdge ? 0 : drawer.width-width x: vertical || drawer.edge === Qt.RightEdge ? 0 : drawer.width-width
y: horizontal || drawer.edge !== Qt.TopEdge ? 0 : drawer.height-height y: horizontal || drawer.edge !== Qt.TopEdge ? 0 : drawer.height-height
width: horizontal ? resizeAreaSize : parent.width width: horizontal ? resizeAreaSize * theme.uiScale : parent.width
height: vertical ? resizeAreaSize : parent.height height: vertical ? resizeAreaSize * theme.uiScale : parent.height
z: 999 z: 999
MouseArea { MouseArea {