]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/button.cpp
Make the Text class interface more obvious by not using a reference to pointer
[libs/gltk.git] / source / button.cpp
index 292625de9f9e4bba00e6598f1ff1eed0d645c207..e7548386e0467cd6f8caec148973098b2fe7bffa 100644 (file)
@@ -14,7 +14,7 @@ namespace GLtk {
 
 Button::Button(const Resources &r, const std::string &t):
        Widget(r),
-       text(style),
+       text(),
        icon(0),
        pressed(false)
 {
@@ -94,7 +94,7 @@ void Button::render_special(const Part &part) const
 
 void Button::on_style_change()
 {
-       text.update_style();
+       text.set_style(style);
 }