]> Dogcows Code - chaz/openbox/blobdiff - otk/label.cc
provide RenderControls to all otk from the display class. initialize them all there...
[chaz/openbox] / otk / label.cc
index 05ed6cfa13c9e3975d643828cd018deb311e9210..2d8b944261878cbca576b083d6db366f0022677a 100644 (file)
@@ -11,14 +11,10 @@ namespace otk {
 Label::Label(Widget *parent)
   : Widget(parent), _text("")
 {
-  const ScreenInfo *info = Display::screenInfo(screen());
-  _xftdraw = XftDrawCreate(Display::display, window(), info->visual(),
-                           info->colormap());
 }
 
 Label::~Label()
 {
-  XftDrawDestroy(_xftdraw);
 }
 
 void Label::setStyle(Style *style)
@@ -66,7 +62,8 @@ void Label::update(void)
 
     Widget::update();
 
-    ft->drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
+    display->renderControl(_screen)->
+      drawString(this, *ft, x, 0, *style()->getTextUnfocus(), t);
   } else
     Widget::update();
 }
This page took 0.020942 seconds and 4 git commands to generate.