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)
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
Widget::update();
- ft->drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
+ display->renderControl(_screen)->
+ drawString(this, *ft, x, 0, *style()->getTextUnfocus(), t);
} else
Widget::update();
}