From: Dana Jansens Date: Tue, 3 Dec 2002 19:01:41 +0000 (+0000) Subject: update the textures being used on setStyle() calls X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=948feddc2e0d3c846e1c4669681c475e99540a8b;p=chaz%2Fopenbox update the textures being used on setStyle() calls --- diff --git a/otk/button.cc b/otk/button.cc index 8dea882e..fd23a569 100644 --- a/otk/button.cc +++ b/otk/button.cc @@ -12,15 +12,24 @@ OtkButton::OtkButton(OtkWidget *parent) : OtkFocusLabel(parent), _pressed(false), _pressed_focus_tx(0), _pressed_unfocus_tx(0), _unpr_focus_tx(0), _unpr_unfocus_tx(0) { + setStyle(getStyle()); +} + +OtkButton::~OtkButton() +{ +} + + +void OtkButton::setStyle(Style *style) +{ + OtkFocusLabel::setStyle(style); + setTexture(getStyle()->getButtonFocus()); setUnfocusTexture(getStyle()->getButtonUnfocus()); _pressed_focus_tx = getStyle()->getButtonPressedFocus(); _pressed_unfocus_tx = getStyle()->getButtonPressedUnfocus(); } -OtkButton::~OtkButton() -{ -} void OtkButton::press(unsigned int mouse_button) { diff --git a/otk/button.hh b/otk/button.hh index a5f93690..2d983fb3 100644 --- a/otk/button.hh +++ b/otk/button.hh @@ -32,6 +32,8 @@ public: void buttonPressHandler(const XButtonEvent &e); void buttonReleaseHandler(const XButtonEvent &e); + void setStyle(Style *style); + private: bool _pressed;