From 924ecb7ece596ba404bd2bfb8b165d07e448b4ad Mon Sep 17 00:00:00 2001 From: quadbyte Date: Mon, 11 Aug 2025 15:22:29 -0400 Subject: [PATCH] Test case for improper scaling of Rectangles when below Layout --- Modules/DemoPanel/DemoPanel.qml | 17 +++++++++++++++-- Widgets/NComboBox.qml | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Modules/DemoPanel/DemoPanel.qml b/Modules/DemoPanel/DemoPanel.qml index e06d04d..76ab436 100644 --- a/Modules/DemoPanel/DemoPanel.qml +++ b/Modules/DemoPanel/DemoPanel.qml @@ -33,6 +33,13 @@ NLoader { anchors.fill: parent } + // A basic rectangle, which scale ok because out of layout + Rectangle { + width: Style.baseWidgetSize * scaling + height: Style.baseWidgetSize * scaling + color: Colors.accentTertiary + } + ColumnLayout { anchors.fill: parent anchors.margins: Style.marginXL * scaling @@ -156,13 +163,19 @@ NLoader { font.weight: Style.fontWeightBold } - NBusyIndicator { - } + NBusyIndicator {} NDivider { Layout.fillWidth: true } } + + // A basic rectangle, which does not scale right?! + Rectangle { + width: Style.baseWidgetSize * scaling + height: Style.baseWidgetSize * scaling + color: Colors.accentPrimary + } } } } diff --git a/Widgets/NComboBox.qml b/Widgets/NComboBox.qml index a936170..459117a 100644 --- a/Widgets/NComboBox.qml +++ b/Widgets/NComboBox.qml @@ -8,7 +8,7 @@ ComboBox { id: root readonly property real scaling: Scaling.scale(screen) - + property list optionsKeys: [] property list optionsLabels: [] property string currentKey: ''