]> Dogcows Code - chaz/openbox/blobdiff - otk/label.cc
ignore the right about of unmap notifies
[chaz/openbox] / otk / label.cc
index bbc8a6b7ae3e04f16f2d6a8105f1eae257f1230f..4a61efd078fca007c669a6c8b010b43da167c7a1 100644 (file)
@@ -12,8 +12,8 @@ OtkLabel::OtkLabel(OtkWidget *parent)
   : OtkWidget(parent), _text("")
 {
   const ScreenInfo *info = OBDisplay::screenInfo(screen());
-  _xftdraw = XftDrawCreate(OBDisplay::display, window(), info->getVisual(),
-                           info->getColormap());
+  _xftdraw = XftDrawCreate(OBDisplay::display, window(), info->visual(),
+                           info->colormap());
 }
 
 OtkLabel::~OtkLabel()
@@ -32,7 +32,7 @@ void OtkLabel::setStyle(Style *style)
 void OtkLabel::update(void)
 {
   if (_dirty) {
-    const BFont &ft = style()->getFont();
+    const BFont *ft = style()->getFont();
     unsigned int sidemargin = style()->getBevelWidth() * 2;
 
     std::string t = _text; // the actual text to draw
@@ -48,7 +48,7 @@ void OtkLabel::update(void)
       
       do {
         t.resize(text_len);
-        length = ft.measureString(t);
+        length = ft->measureString(t);
       } while (length > max_length && text_len-- > 0);
 
       // justify the text
@@ -66,7 +66,7 @@ void OtkLabel::update(void)
 
     OtkWidget::update();
 
-    ft.drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
+    ft->drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
   } else
     OtkWidget::update();
 }
This page took 0.024809 seconds and 4 git commands to generate.