How to specify the "cross-align" of a layout? #10388
Unanswered
tadeohepperle
asked this question in
Q&A
Replies: 2 comments
-
|
This feature is not yet implemented and is tracked in #2587 , feel free to add 👍 to it. In the mean time, the recommended way is to do it as you do with inner layouts. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Haha, this feature gets brought up by different people every now and then. To be fair, adding cross-axis-alignment would indeed greatly improve the usability of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am often in need of specifying how children of a layout should be aligned across the "cross axis" as opposed to the "main axis" that can be specified on VerticalLayout and HorizontalLayout via the
alignmentproperty in slint.CrossAxisAlignmentenum for this.align-itemsfor cross axis alignment.Let's say I want to make a layout like this:
The only way I can think of doing this in slint is via:
It would be so much easier to do something like this:
Is there a feature for this in slint? Adding cross alignment to a layout algorithm should be quite easy, I've done it myself in an immediate mode UI for games and it reduced the number of nested layouts needed by a lot.
Beta Was this translation helpful? Give feedback.
All reactions