X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flabel.cpp;h=6db6aa37820b593fa693cce70de22b65da469b2f;hb=91997dd3189b93a67179822ec2fed5f2a7bddb74;hp=63b0ebdc2a1b24f366d9f4b28e82646455a5c4c3;hpb=787dd5572e904a87686e7309401b86e0c528d823;p=libs%2Fgltk.git diff --git a/source/label.cpp b/source/label.cpp index 63b0ebd..6db6aa3 100644 --- a/source/label.cpp +++ b/source/label.cpp @@ -14,17 +14,17 @@ using namespace std; 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"))