mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-03-24 11:24:08 +08:00
Previously, all fixed panes without a minimum size were forced to have a proportion of 0 in wxAUI layout code, which meant that a wxAuiToolBar with stretchable elements (typically spaces, but labels and controls could be stretchable too) couldn't stretch unless its pane was given some non-default minimum size, even if it was just wxSize(-1,1). This was completely undiscoverable and not intuitive at all, so let wxAuiToolBar stretch if it has any stretchable elements, regardless of its pane min size instead. This required adding wxAuiToolBar::CanStretch() and using an ugly dynamic cast. We could probably avoid this by using some kind of heuristic based on e.g. comparing min and best size, but this is simple and guaranteed not to break anything else, so do it like this for now. See #26252. Closes #26249.