phosphorjs / phosphor

The PhosphorJS Library
BSD 3-Clause "New" or "Revised" License
1.04k stars 166 forks source link

Stretch factors and size basis should be initialized when sizer is created. #442

Open sccolbert opened 4 years ago

sccolbert commented 4 years ago

For BoxLayout and SplitLayout, these properties should be initialized when the sizer is created (if possible). In some cases, the widget will be resized before the fit request is processed. This means the initial layout will have stale data. In the case of the SplitLayout, this causes the initial layout to be completely wrong when one widget has a stretch factor of zero.

https://github.com/phosphorjs/phosphor/blob/master/packages/widgets/src/splitlayout.ts#L297