]> Dogcows Code - chaz/openbox/blobdiff - otk/label.cc
provide the strut for the frame's size instead of an area rect
[chaz/openbox] / otk / label.cc
index 4a61efd078fca007c669a6c8b010b43da167c7a1..da9edfd179708c591b30b6fbbe2e6f4ff6ceed59 100644 (file)
@@ -8,34 +8,34 @@
 
 namespace otk {
 
-OtkLabel::OtkLabel(OtkWidget *parent)
-  : OtkWidget(parent), _text("")
+Label::Label(Widget *parent)
+  : Widget(parent), _text("")
 {
-  const ScreenInfo *info = OBDisplay::screenInfo(screen());
-  _xftdraw = XftDrawCreate(OBDisplay::display, window(), info->visual(),
+  const ScreenInfo *info = display->screenInfo(screen());
+  _xftdraw = XftDrawCreate(**display, window(), info->visual(),
                            info->colormap());
 }
 
-OtkLabel::~OtkLabel()
+Label::~Label()
 {
   XftDrawDestroy(_xftdraw);
 }
 
-void OtkLabel::setStyle(Style *style)
+void Label::setStyle(Style *style)
 {
-  OtkWidget::setStyle(style);
+  Widget::setStyle(style);
 
   setTexture(style->getLabelUnfocus());
 }
 
 
-void OtkLabel::update(void)
+void Label::update(void)
 {
   if (_dirty) {
-    const BFont *ft = style()->getFont();
+    const Font *ft = style()->getFont();
     unsigned int sidemargin = style()->getBevelWidth() * 2;
 
-    std::string t = _text; // the actual text to draw
+    ustring t = _text; // the actual text to draw
     int x = sidemargin;    // x coord for the text
 
     // find a string that will fit inside the area for text
@@ -64,11 +64,11 @@ void OtkLabel::update(void)
       }
     }
 
-    OtkWidget::update();
+    Widget::update();
 
     ft->drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
   } else
-    OtkWidget::update();
+    Widget::update();
 }
 
 }
This page took 0.027818 seconds and 4 git commands to generate.