rack::ui::Label Struct Reference

I’m looking for best practices in GitHub.

Is there any module developer actively using Label()?

I use it all the time, although mostly for temp ui. The documentation is the hpp file.

1 Like

No better best practice example is needed than a Squinky module! Thank you for the hint (& your readable codes)!

my pleasure! btw, Labels aren’t so great. For one thing, it’s easy to make a panel where the panel font is different from the label font. Also I don’t think Labels are backed by the transparent buffer widget, so that may be inefficient. But they are handy.

I want to avoid opening Inkscape and I’ve started checking how to add labels by code. I clearly would like to use fancy ttf fonts but it’s not worth the extra codes for me. Your straight forward addLabel() solution is exactly what I like to see in my (otherwise rather messy) code.

ah, yeah, makes sense. What I do/did, when possible, is prototype everything with labels, and give the controls positions in code that are ugly, but at least work. Then, last I make a proper panel (still considered ugly by most) and use real rendered text in the drawing program, line everything up, etc… then take the labels out of the code (and copy over all the control positions to the code).

Also, I’ve never used Inkscape, and hope to keep it that way :wink: