: OtkFocusWidget(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());
}
OtkFocusLabel::~OtkFocusLabel()
void OtkFocusLabel::update(void)
{
if (_dirty) {
- const BFont &ft = style()->getFont();
+ const BFont *ft = style()->getFont();
BColor *text_color = (isFocused() ? style()->getTextFocus()
: style()->getTextUnfocus());
unsigned int sidemargin = style()->getBevelWidth() * 2;
do {
t.resize(text_len);
- length = ft.measureString(t);
+ length = ft->measureString(t);
} while (length > max_length && text_len-- > 0);
// justify the text
OtkFocusWidget::update();
- ft.drawString(_xftdraw, x, 0, *text_color, t);
+ ft->drawString(_xftdraw, x, 0, *text_color, t);
} else
OtkFocusWidget::update();
}