Test case for improper scaling of Rectangles when below Layout

This commit is contained in:
quadbyte 2025-08-11 15:22:29 -04:00
parent ab7bb4a6d4
commit 924ecb7ece
2 changed files with 16 additions and 3 deletions

View file

@ -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
}
}
}
}

View file

@ -8,7 +8,7 @@ ComboBox {
id: root
readonly property real scaling: Scaling.scale(screen)
property list<string> optionsKeys: []
property list<string> optionsLabels: []
property string currentKey: ''