You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a box whose cross-axis dimension is set explicitly and whose parent is the opposite direction, align_items = START works correctly, but CENTER and END don't. The children align properly relative to each other, but only within the amount of cross space they would have taken up with START.
Steps to reproduce
Create a box, either a row or a column, and give it children.
Give it a fixed dimension in its cross axis.
Add it as a child of a box with the opposite direction.
Setting it unconditionally to the larger value ensures that the children move to center/end within the available space. But this, of course, breaks other things... I haven't stared at the algorithm long enough to fully grok the proper fix.
The text was updated successfully, but these errors were encountered:
Describe the bug
In a box whose cross-axis dimension is set explicitly and whose parent is the opposite direction,
align_items = START
works correctly, butCENTER
andEND
don't. The children align properly relative to each other, but only within the amount of cross space they would have taken up withSTART
.Steps to reproduce
align_items
to eitherCENTER
orEND
.Try it out with this example app: https://gist.github.com/HalfWhitt/b8ccc0d93727c49bae0cfe4532c1e599
Expected behavior
The center- or end-aligned children should be placed at the center or end-side of the box.
Screenshots
Environment
I thought this was a new bug at first, but it applies to
alignment
as well, at least as far back as 0.4.0.Logs
No response
Additional context
This is just before pass 4 of the layout algorithm:
toga/core/src/toga/style/pack.py
Lines 819 to 820 in bcc2028
Setting it unconditionally to the larger value ensures that the children move to center/end within the available space. But this, of course, breaks other things... I haven't stared at the algorithm long enough to fully grok the proper fix.
The text was updated successfully, but these errors were encountered: