X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbutton.cpp;h=e7548386e0467cd6f8caec148973098b2fe7bffa;hb=ef4660c4bdf38e126e13b426649fc2f997027b65;hp=c9bca9adcdeebb25f0478f1faee0804e8fa77d46;hpb=1e06dc208a02e68cf1bb127927e3ad5af3657c58;p=libs%2Fgltk.git diff --git a/source/button.cpp b/source/button.cpp index c9bca9a..e754838 100644 --- a/source/button.cpp +++ b/source/button.cpp @@ -14,7 +14,7 @@ namespace GLtk { Button::Button(const Resources &r, const std::string &t): Widget(r), - text(style), + text(), icon(0), pressed(false) { @@ -67,7 +67,6 @@ void Button::pointer_motion(int x, int y) void Button::render_special(const Part &part) const { if(part.get_name()=="text") - //render_text(part, text); text.render(part, geom); if(part.get_name()=="icon" && icon) { @@ -93,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)