diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-08 15:45:33 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-08 15:45:33 +0000 |
| commit | e5cdd193b2f57bb55851eb6bba764003ea01ffe5 (patch) | |
| tree | f3b358851d7b2afb79cbddec39cee6acb0fec70a /src/Fl.cxx | |
| parent | ee58dd2f628ef045db0706b812a3bc9febcac6d9 (diff) | |
Fix label redraw bug.
Remove unused variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index bd665eb26..a42cfcf25 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.57 2002/10/30 01:26:03 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.58 2002/11/08 15:45:31 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -871,7 +871,7 @@ void Fl_Widget::redraw_label() { // background... int X = x() > 0 ? x() - 1 : 0; int Y = y() > 0 ? y() - 1 : 0; - damage(FL_DAMAGE_ALL, X, Y, w() + 2, h() + 2); + window()->damage(FL_DAMAGE_ALL, X, Y, w() + 2, h() + 2); } if (align() && !(align() & FL_ALIGN_INSIDE) && window()->shown()) { @@ -879,17 +879,19 @@ void Fl_Widget::redraw_label() { // the label and redraw the window within that bounding box... int W = 0, H = 0; label_.measure(W, H); + W += 5; // Add a little to the size of the label to cover overflow + H += 5; if (align() & FL_ALIGN_BOTTOM) { - damage(FL_DAMAGE_EXPOSE, x(), y() + h(), w(), H); + window()->damage(FL_DAMAGE_EXPOSE, x(), y() + h(), w(), H); } else if (align() & FL_ALIGN_TOP) { - damage(FL_DAMAGE_EXPOSE, x(), y() - H, w(), H); + window()->damage(FL_DAMAGE_EXPOSE, x(), y() - H, w(), H); } else if (align() & FL_ALIGN_LEFT) { - damage(FL_DAMAGE_EXPOSE, x() - W, y(), W, h()); + window()->damage(FL_DAMAGE_EXPOSE, x() - W, y(), W, h()); } else if (align() & FL_ALIGN_RIGHT) { - damage(FL_DAMAGE_EXPOSE, x() + w(), y(), W, h()); + window()->damage(FL_DAMAGE_EXPOSE, x() + w(), y(), W, h()); } else { - damage(FL_DAMAGE_ALL); + window()->damage(FL_DAMAGE_ALL); } } else { // The label is inside the widget, so just redraw the widget itself... @@ -973,5 +975,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.57 2002/10/30 01:26:03 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.58 2002/11/08 15:45:31 easysw Exp $". // |
