Open PiGo86 opened 1 month ago
Thanks for the report.
It looks like the issue is related to setting the split proportion before the widget is visible. Due to a quirk of how GTK renders, we can't apply the split proportion at the time the content is defined - we need to wait until the widget is rendered, and the apply the split proportion. However, when this is done on a widget that hasn't been rendered yet, the set_bounds()
operation that would apply the split occurs when the widget's size is "1x1"... which is ignored, because GTK's split position is based on actual pixels, not a proportion.
My guess is that there's a missing invocation to set_bounds()
because the widget is the "top level" widget in the layout - but more investigation is required.
Describe the bug
I tried to implement a 1/3 - 2/3 UI with SplitContainer, by running this code inspired by the Toga documentation:
As a result, I get a 1/2 - 1/2 ratio (see screenshot)
Steps to reproduce
Run the code above
Expected behavior
Getting a 1/3 - 2/3 ratio
Screenshots
Environment
Logs
Additional context
No response