X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fbutton.cc;h=08dc0484a50f6b2192e306fb595227b7b3150981;hb=5dfd87b08505554688640357f3a07593f3bd9ec2;hp=04906fe517306f1e06baa4d5a0dbdf28c7934a2c;hpb=d8d9b42777ace234f3471918e1210062578f8188;p=chaz%2Fopenbox diff --git a/otk/button.cc b/otk/button.cc index 04906fe5..08dc0484 100644 --- a/otk/button.cc +++ b/otk/button.cc @@ -12,6 +12,7 @@ Button::Button(Widget *parent) : FocusLabel(parent), _pressed(false), _pressed_focus_tx(0), _pressed_unfocus_tx(0), _unpr_focus_tx(0), _unpr_unfocus_tx(0) { + setStyle(_style); } Button::~Button() @@ -19,15 +20,14 @@ Button::~Button() } -void Button::setStyle(Style *style) +void Button::setStyle(RenderStyle *style) { FocusLabel::setStyle(style); - // XXX: do this again - //setTexture(style->getButtonFocus()); - //setUnfocusTexture(style->getButtonUnfocus()); - //_pressed_focus_tx = style->getButtonPressedFocus(); - //_pressed_unfocus_tx = style->getButtonPressedUnfocus(); + setTexture(style->buttonUnpressFocusBackground()); + setUnfocusTexture(style->buttonUnpressUnfocusBackground()); + _pressed_focus_tx = style->buttonPressFocusBackground(); + _pressed_unfocus_tx = style->buttonPressUnfocusBackground(); }