namespace Msp {
namespace GLtk {
-Label::Label(const Resources &r, const string &t):
- Widget(r),
- text()
+Label::Label(const string &t)
{
focusable = false;
- update_style();
set_text(t);
}
void Label::autosize()
{
+ if(!style)
+ return;
+
geom.h = text.get_height();
geom.w = text.get_width();
if(const Part *text_part = style->get_part("text"))