: 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()
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
do {
t.resize(text_len);
- length = ft.measureString(t);
+ length = ft->measureString(t);
} while (length > max_length && text_len-- > 0);
// justify the text
OtkWidget::update();
- ft.drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
+ ft->drawString(_xftdraw, x, 0, *style()->getTextUnfocus(), t);
} else
OtkWidget::update();
}