]> 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 91cc88c403365bfabde2a9f943627bd0814c0325..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)
 {
@@ -92,6 +92,11 @@ void Button::render_special(const Part &part) const
        }
 }
 
+void Button::on_style_change()
+{
+       text.set_style(style);
+}
+
 
 Button::Loader::Loader(Button &btn):
        Widget::Loader(btn)