widgets/wrapper: support overriding implicit size

This commit is contained in:
outfoxxed 2025-05-24 01:55:55 -07:00
parent e135de9ec6
commit 3cf96ecf97
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 146 additions and 26 deletions

View file

@ -28,6 +28,8 @@ FloatingWindow {
bottomMargin: separateMarginsCb.checked ? bottomMarginSlider.value : undefined
leftMargin: separateMarginsCb.checked ? leftMarginSlider.value : undefined
rightMargin: separateMarginsCb.checked ? rightMarginSlider.value : undefined
implicitWidth: parentImplicitSizeCb.checked ? parentImplicitWidthSlider.value : undefined
implicitHeight: parentImplicitSizeCb.checked ? parentImplicitHeightSlider.value : undefined
}
Rectangle {
@ -55,6 +57,11 @@ FloatingWindow {
id: separateMarginsCb
text: "Individual Margins"
}
CheckBox {
id: parentImplicitSizeCb
text: "Parent Implicit Size"
}
}
RowLayout {
@ -93,6 +100,24 @@ FloatingWindow {
}
}
RowLayout {
Layout.fillWidth: true
Label { text: "Parent Implicit Width" }
Slider {
id: parentImplicitWidthSlider
Layout.fillWidth: true
from: 0; to: 300; value: 200
}
Label { text: "Parent Implicit Height" }
Slider {
id: parentImplicitHeightSlider
Layout.fillWidth: true
from: 0; to: 300; value: 200
}
}
RowLayout {
Layout.fillWidth: true