update the textures being used on setStyle() calls

This commit is contained in:
Dana Jansens 2002-12-03 19:01:41 +00:00
parent bf95658de2
commit 948feddc2e
2 changed files with 14 additions and 3 deletions

View file

@ -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)
{

View file

@ -32,6 +32,8 @@ public:
void buttonPressHandler(const XButtonEvent &e);
void buttonReleaseHandler(const XButtonEvent &e);
void setStyle(Style *style);
private:
bool _pressed;