dimsuz
02/13/2024, 4:19 PMRow {
Button("!Yes")
Button("No", Modifier.weight(1f))
}
And it causes line break to appear for some reason.
If I replace "!Yes"
with even longer "HelloYes"
, than no line break occurs.
Why is this happening?
P.S. Using ".Yes"
results in no wrapping too, but using "?Yes"
wraps. It's quite selective.
UPD Turns out this is a custom Button
component and although it's based on a material one, I can't reproduce this with pure-material buttons. Investigating...Peter
02/13/2024, 4:39 PMCasey Brooks
02/13/2024, 4:42 PM.Yes
does not break while !Yes
and ?Yes
do is likely due to the fact that .
has a shorter-width than !
or ?
.Casey Brooks
02/13/2024, 4:42 PMmaxLines = 1
in the Text()
composable, or including a Modifier.defaultMinSize(width = ...)
dimsuz
02/13/2024, 4:44 PMModifier.width(IntrinsicSize.Min)
to the Button
call.
I'm not yet sure why this was done (not my code), but if I remove this modifier, it measures "!Yes"-button correctly and no line breaks are inserted.Zach Klippenstein (he/him) [MOD]
02/14/2024, 8:36 PMdimsuz
02/19/2024, 4:18 PM