X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Flabel.cc;h=bbc8a6b7ae3e04f16f2d6a8105f1eae257f1230f;hb=723739dafe91a156fef527f3b53a483195695cf1;hp=ceb6a49cc2a9cf7c082f585741f7d8b34d73deb8;hpb=70eb03ad50e1a71fd64c8cb1ebabbff311850553;p=chaz%2Fopenbox diff --git a/otk/label.cc b/otk/label.cc index ceb6a49c..bbc8a6b7 100644 --- a/otk/label.cc +++ b/otk/label.cc @@ -11,8 +11,8 @@ namespace otk { OtkLabel::OtkLabel(OtkWidget *parent) : OtkWidget(parent), _text("") { - const ScreenInfo *info = OBDisplay::screenInfo(getScreen()); - _xftdraw = XftDrawCreate(OBDisplay::display, getWindow(), info->getVisual(), + const ScreenInfo *info = OBDisplay::screenInfo(screen()); + _xftdraw = XftDrawCreate(OBDisplay::display, window(), info->getVisual(), info->getColormap()); } @@ -25,15 +25,15 @@ void OtkLabel::setStyle(Style *style) { OtkWidget::setStyle(style); - setTexture(getStyle()->getLabelUnfocus()); + setTexture(style->getLabelUnfocus()); } void OtkLabel::update(void) { if (_dirty) { - const BFont &ft = getStyle()->getFont(); - unsigned int sidemargin = getStyle()->getBevelWidth() * 2; + const BFont &ft = style()->getFont(); + unsigned int sidemargin = style()->getBevelWidth() * 2; std::string t = _text; // the actual text to draw int x = sidemargin; // x coord for the text @@ -52,7 +52,7 @@ void OtkLabel::update(void) } while (length > max_length && text_len-- > 0); // justify the text - switch (getStyle()->textJustify()) { + switch (style()->textJustify()) { case Style::RightJustify: x += max_length - length; break; @@ -66,7 +66,7 @@ void OtkLabel::update(void) OtkWidget::update(); - ft.drawString(_xftdraw, x, 0, *getStyle()->getTextUnfocus(), t); + ft.drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t); } else OtkWidget::update(); }