Layouts inside SplitContainer (and OptionContainer?) don't update until resizing finishes
Describe the bug
In Toga Demo — at least on macOS — when you drag the window to resize, or drag the middle divider back in forth, the layouts within the two panes of the SplitContainer don't update until the mouse button / trackpad is released. The OptionContainer on the left does resize itself continuously, but the table (or tree) within it doesn't.
The teal background in the OptionContainer example behaves similarly.
Steps to reproduce
pip install toga-demo
toga-demo
Or, in a copy of the repository:
cd examples/optioncontainer
python -m optioncontainer
Expected behavior
Intuitively, I'd expect the table/tree and the buttons to change size dynamically as the window is resized and the middle slider is moved.
Screenshots
https://github.com/user-attachments/assets/42fef2bc-2b12-4073-a52d-370cce0f69ba
Environment
- Operating System: macOS Sonoma 14.7.3
- Python version: 3.13.0
- Toga: Development
Logs
Additional context
I haven't poked any at this yet, but I thought I'd go ahead and post it since I don't see an existing issue for it.
Worth noting that in both these cases, the demo is a "container in a container" - the left is an Option Container inside a SplitConatiner; the right is a ScrollContainer inside a SplitContainer. So - it's not necessarily clear if the issue is:
- SplitContainer not passing down resize requests appropriately
- OptionContainer and ScrollContainer not handling resize requests appropriately
- Containers inside Containers as a general principle.
I didn't even notice the ScrollContainer on the right, despite having just talked about how, unlike in HTML/CSS, boxes can't spontaneously grow scrollbars on their own.