yglukhov / nimx

GUI library
MIT License
1.08k stars 76 forks source link

some linebreaks are missing when label is narrow. #517

Open veksha opened 1 year ago

veksha commented 1 year ago

hi.

i'm using label like this:

let label = newLabel newRect(20, 20, 150, 20)
label.verticalAlignment = vaTop
label.text = res[0].lyric.replace("\r\n", "|\r\n")
cc.addSubview(label)
v.addSubview(cc)

and i get this picture:

image

as you can see some linebreaks are missing. (before "Lunacy", "Turns" and "Cannot")

if i change width of label rect from 150 to 500, i get nice linebreaks:

image

question: is this a bug?

yglukhov commented 1 year ago

Yes, looks like a bug to me.