, the Box is small and the Text might be multi-line. How do I center the Box with the first line of the text (independent of what the font might be)?
Marcin Wisniowski
04/23/2024, 2:36 PM
My current solution is to put the box into another box that uses center alignment and has the height set to the font size of the text, but I feel there is a nicer solution.
s
Stylianos Gakis
04/23/2024, 4:11 PM
Have you looked into alignByFirstBaseline (I think) modifier and in general things around using baselines? Or is this not what you want here?
m
Marcin Wisniowski
04/23/2024, 4:33 PM
I did try using them but they didn't seem to work. They seem to only work when the element you are aligning also has a baseline, like aligning two Texts together by baselines.