Fixed issue with drawing label

This commit is contained in:
Sanel Zukan 2011-10-28 09:12:49 +00:00
parent 9f349dae04
commit 9a48273fd4

View File

@ -115,7 +115,7 @@ void TaskButton::draw(void) {
fl_color(labelcolor()); fl_color(labelcolor());
lw = lh = 0; lw = lh = 0;
fl_measure(label(), lw, lh, align()); fl_measure(label(), lw, lh, 0);
/* use clipping so long labels do not be drawn on the right border, which looks ugly */ /* use clipping so long labels do not be drawn on the right border, which looks ugly */
fl_push_clip(x() + Fl::box_dx(box()), fl_push_clip(x() + Fl::box_dx(box()),
@ -123,8 +123,8 @@ void TaskButton::draw(void) {
w() - Fl::box_dw(box()) - 5, w() - Fl::box_dw(box()) - 5,
h() - Fl::box_dh(box())); h() - Fl::box_dh(box()));
Y = (y() + h() / 2) - (lh / 2); Y = (y() + h() / 2) - (lh / 2);
fl_draw(label(), X, Y, lw, lh, align(), 0, 0); fl_draw(label(), X, Y, lw, lh, align(), 0, 0);
fl_pop_clip(); fl_pop_clip();
} }