summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-11-08 15:45:33 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-11-08 15:45:33 +0000
commite5cdd193b2f57bb55851eb6bba764003ea01ffe5 (patch)
treef3b358851d7b2afb79cbddec39cee6acb0fec70a /src
parentee58dd2f628ef045db0706b812a3bc9febcac6d9 (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')
-rw-r--r--src/Fl.cxx18
-rw-r--r--src/Fl_Group.cxx5
2 files changed, 12 insertions, 11 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 $".
//
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx
index 17ab21b52..95ffa1eb3 100644
--- a/src/Fl_Group.cxx
+++ b/src/Fl_Group.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Group.cxx,v 1.8.2.8.2.19 2002/11/08 15:22:11 easysw Exp $"
+// "$Id: Fl_Group.cxx,v 1.8.2.8.2.20 2002/11/08 15:45:33 easysw Exp $"
//
// Group widget for the Fast Light Tool Kit (FLTK).
//
@@ -533,7 +533,6 @@ void Fl_Group::draw_children() {
}
void Fl_Group::draw() {
- Fl_Widget*const* a = array();
if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing:
draw_box();
draw_label();
@@ -594,5 +593,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& widget) const {
}
//
-// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.19 2002/11/08 15:22:11 easysw Exp $".
+// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.20 2002/11/08 15:45:33 easysw Exp $".
//