Commit a2c7031
committed
Scale Outline controls by natural width
Previously, the Outline/Shadow spinboxes and the Border Style combobox
shared a fixed sizer proportion of 1. Because the combobox has a much
wider natural size than the spinboxes, the wxBoxSizer forced the
spinboxes to stretch excessively to match the combobox's width.
This changes `add_with_label` to use the control's natural width
(`GetBestSize().GetWidth()`) as its sizer proportion instead of a
fixed value.
By weighting the proportion based on width, the layout achieves two
goals:
1. At the default dialog size, the spinboxes are not forced to expand
to match the wider combobox, allowing them to retain their compact,
natural size.
2. When the dialog is resized horizontally, all controls expand
together, distributing the extra space relative to their original
widths, rather than the combobox remaining fixed or the spinboxes
growing disproportionately.1 parent 0516975 commit a2c7031
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments