Window.LabelWrap fails to display text (fix provided)
Closed this issue · 4 comments
Just based on a quick look at the code, this should be a super simple fix. The problem is in the LabelWrapColor
function. The function tries to use the color parameter as the text to display:
Line 1557 in 1e37c3d
It should instead read:
text.Text = str
Thank you.
that wasn't a fix. text.Text and str have different types.
compilation fails now:
.../pkg/mod/github.com/aarzilli/nucular@v0.0.0-20220829112915-6863502f5866/nucular.go:1559:14: cannot use str (variable of type string) as type color.RGBA in assignment
Oh sorry. I just assumed it was a typo as I only took a quick look.
Is there another explanation for why wrapped labels don't display any text?
Turns out the problem was that the row wasn't tall enough to allow the text to wrap onto a new line. This resulted in the text not displaying at all, rather than displaying just the first line and being cut off.
Closing as this is not an actual issue, just user error. Although maybe this should be documented?