summaryrefslogtreecommitdiff
path: root/otk/label.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-03 19:10:03 +0000
committerDana Jansens <danakj@orodu.net>2002-12-03 19:10:03 +0000
commit26adc8853bc04f3f2f2d2e5f5ac94121f23b72e2 (patch)
tree363f53c275dfb53731c60c92f419d40adccae19d /otk/label.cc
parentf890d31d6bf41db5c565e4f1b25132a6df1bd044 (diff)
label and focuslabel update their textures automatically on a style change
Diffstat (limited to 'otk/label.cc')
-rw-r--r--otk/label.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/otk/label.cc b/otk/label.cc
index 24cf8402..170974ac 100644
--- a/otk/label.cc
+++ b/otk/label.cc
@@ -15,7 +15,7 @@ OtkLabel::OtkLabel(OtkWidget *parent)
_xftdraw = XftDrawCreate(OBDisplay::display, getWindow(), info->getVisual(),
info->getColormap());
- setTexture(getStyle()->getLabelUnfocus());
+ setStyle(getStyle());
}
OtkLabel::~OtkLabel()
@@ -23,6 +23,14 @@ OtkLabel::~OtkLabel()
XftDrawDestroy(_xftdraw);
}
+void OtkLabel::setStyle(Style *style)
+{
+ OtkWidget::setStyle(style);
+
+ setTexture(getStyle()->getLabelUnfocus());
+}
+
+
void OtkLabel::update(void)
{
if (_dirty) {