Fix label redraw bug.
Remove unused variable. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ee58dd2f62
commit
e5cdd193b2
3
CHANGES
3
CHANGES
@ -1,5 +1,8 @@
|
||||
CHANGES IN FLTK 1.1.2
|
||||
|
||||
- The redraw_label() method didn't damage the parent
|
||||
window when the label was outside the widget's
|
||||
bounding box.
|
||||
- Added a "draw_children()" method to Fl_Group to make
|
||||
subclassing Fl_Group with a custom draw() function
|
||||
easier.
|
||||
|
18
src/Fl.cxx
18
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 $".
|
||||
//
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user