Some improvements in text handling for TextWidget

16 views
Skip to first unread message

guille.r...@gmail.com

unread,
Jan 8, 2018, 11:52:40 AM1/8/18
to PlayN
Hi all,

I just submitted a PR (https://github.com/threerings/tripleplay/pull/67) that adds a new ELLIPSIZE style which allows to automatically clip a text widget's text to fit in the available horizontal space. This is equivalent to text-overflow: ellipsis in CSS.

The new ELLIPSIZE style can be combined with AUTO_SHRINK: In that case, shrinking will be applied first, then if the text still does not fit, it will be clipped.

For best results I also made the min font size used by AUTO_SHRINK configurable.

Hope this is useful.

Guillermo

Michael Bayne

unread,
Jan 12, 2018, 3:02:10 PM1/12/18
to pl...@googlegroups.com
Awesome, thanks! I just merged the PR.

--

---
You received this message because you are subscribed to the Google Groups "PlayN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to playn+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages