mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Fixed issue with drawing label
This commit is contained in:
parent
9f349dae04
commit
9a48273fd4
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user