]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/label.cpp
Rearrange members
[libs/gltk.git] / source / label.cpp
index 63b0ebdc2a1b24f366d9f4b28e82646455a5c4c3..6db6aa37820b593fa693cce70de22b65da469b2f 100644 (file)
@@ -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"))