- xpos = max (3, 1 + (x2 - (width/2)));
- xpos = min (darea.get_width() - width - 3, xpos);
- }
-
- win->draw_layout (get_style()->get_text_gc (get_state()),
- xpos,
- (darea.get_height()/2) - (height/2),
- layout);
+ x = max (3, 1 + (x2 - (width/2)));
+ x = min (darea.get_width() - width - 3, (int) lrint (xpos));
+ } else {
+ x = lrint (darea.get_width() * xpos);
+ }
+
+ c = get_style()->get_text (get_state());
+ r = c.get_red_p ();
+ g = c.get_green_p ();
+ b = c.get_blue_p ();
+ context->set_source_rgb (r, g, b);
+ context->move_to (x, (darea.get_height()/2) - (height/2));
+ layout->show_in_cairo_context (context);