- if (_dirty) {
- const BFont ft = getStyle()->getFont();
- BColor *text_color = (isFocused() ? getStyle()->getTextFocus()
- : getStyle()->getTextUnfocus());
- unsigned int bevel = getStyle()->getBevelWidth();
-
- OtkFocusWidget::resize(ft.measureString(_text) + bevel * 2,
- ft.height() + bevel * 2);
-
- OtkFocusWidget::update();
-
- ft.drawString(getWindow(), bevel, bevel, *text_color, _text);
- } else
- OtkFocusWidget::update();
+ if (isHighlighted()) {
+ if (_pressed)
+ _texture = style.buttonPressFocusBackground();
+ else
+ _texture = style.buttonUnpressFocusBackground();
+ _forecolor = style.buttonFocusColor();
+ } else {
+ if (_pressed)
+ _texture = style.buttonPressUnfocusBackground();
+ else
+ _texture = style.buttonUnpressUnfocusBackground();
+ _forecolor = style.buttonUnfocusColor();
+ }
+ refresh();