diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-03 19:10:03 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-03 19:10:03 +0000 |
| commit | 26adc8853bc04f3f2f2d2e5f5ac94121f23b72e2 (patch) | |
| tree | 363f53c275dfb53731c60c92f419d40adccae19d /otk/focuslabel.cc | |
| parent | f890d31d6bf41db5c565e4f1b25132a6df1bd044 (diff) | |
label and focuslabel update their textures automatically on a style change
Diffstat (limited to 'otk/focuslabel.cc')
| -rw-r--r-- | otk/focuslabel.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/otk/focuslabel.cc b/otk/focuslabel.cc index 50b473d8..234aca04 100644 --- a/otk/focuslabel.cc +++ b/otk/focuslabel.cc @@ -16,9 +16,7 @@ OtkFocusLabel::OtkFocusLabel(OtkWidget *parent) const ScreenInfo *info = OBDisplay::screenInfo(getScreen()); _xftdraw = XftDrawCreate(OBDisplay::display, getWindow(), info->getVisual(), info->getColormap()); - - setTexture(getStyle()->getLabelFocus()); - setUnfocusTexture(getStyle()->getLabelUnfocus()); + setStyle(getStyle()); } OtkFocusLabel::~OtkFocusLabel() @@ -26,6 +24,16 @@ OtkFocusLabel::~OtkFocusLabel() XftDrawDestroy(_xftdraw); } + +void OtkFocusLabel::setStyle(Style *style) +{ + OtkFocusWidget::setStyle(style); + + setTexture(getStyle()->getLabelFocus()); + setUnfocusTexture(getStyle()->getLabelUnfocus()); +} + + void OtkFocusLabel::update(void) { if (_dirty) { |
