revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

feat(components): add `underline` prop to Text component #905

Closed zbaylin closed 4 years ago

zbaylin commented 4 years ago

This is another fairly simple addition. We get the underline info from Skia via FontMetrics and draw a rectangle from it.

Here's what the text looks like all underlined (before I added the property):

Screen Shot 2020-06-08 at 8 53 54 AM

I also added it to the components that use Text, like ClickableText and Link. I made Links underlined by default and ClickableTexts not.