]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/label.cpp
Make autosize_special const and add a const autosize overload
[libs/gltk.git] / source / label.cpp
index e6b7efb0192b460185df5ac4d11a870ceb20e339..c59e71851d3ceaee9b91ce71203087b79220e35d 100644 (file)
@@ -20,7 +20,7 @@ void Label::set_text(const string &t)
        rebuild();
 }
 
-void Label::autosize_special(const Part &part, Geometry &ageom)
+void Label::autosize_special(const Part &part, Geometry &ageom) const
 {
        if(part.get_name()=="text")
                text.autosize(part, ageom);
@@ -29,7 +29,7 @@ void Label::autosize_special(const Part &part, Geometry &ageom)
 void Label::rebuild_special(const Part &part)
 {
        if(part.get_name()=="text")
-               text.build(part, geom, part_cache);
+               text.build(part, state, geom, part_cache);
 }
 
 void Label::on_style_change()