summaryrefslogtreecommitdiff
path: root/src/Fl_Pack.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-04-25 01:39:36 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-04-25 01:39:36 +0000
commit13fbd26b995a06c342006c958829011ab2e8858c (patch)
treeead91d1ae21bba89ae9d1549aa735d52d401383e /src/Fl_Pack.cxx
parent04af81c07ecb67a69193f775cfc589fdc9177ded (diff)
Fl_Pack didn't draw child widget labels the same way as
Fl_Group, causing display problems (STR #360) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3400 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Pack.cxx')
-rw-r--r--src/Fl_Pack.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/Fl_Pack.cxx b/src/Fl_Pack.cxx
index cfaf19808..f82728856 100644
--- a/src/Fl_Pack.cxx
+++ b/src/Fl_Pack.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Pack.cxx,v 1.6.2.4.2.6 2004/04/11 04:38:58 easysw Exp $"
+// "$Id: Fl_Pack.cxx,v 1.6.2.4.2.7 2004/04/25 01:39:36 easysw Exp $"
//
// Packing widget for the Fast Light Tool Kit (FLTK).
//
@@ -45,7 +45,7 @@ void Fl_Pack::draw() {
int tw = w()-Fl::box_dw(box());
int th = h()-Fl::box_dh(box());
int rw, rh;
- int current_position = horizontal() ? tx : ty;
+ int current_position = (horizontal() ? tx : ty) + spacing_ / 2;
int maximum_position = current_position;
uchar d = damage();
Fl_Widget*const* a = array();
@@ -102,7 +102,10 @@ void Fl_Pack::draw() {
o->resize(X,Y,W,H);
o->clear_damage(FL_DAMAGE_ALL);
}
- if (d&FL_DAMAGE_ALL) draw_child(*o); else update_child(*o);
+ if (d&FL_DAMAGE_ALL) {
+ draw_child(*o);
+ draw_outside_label(*o);
+ } else update_child(*o);
// child's draw() can change it's size, so use new size:
current_position += (horizontal() ? o->w() : o->h());
if (current_position > maximum_position)
@@ -127,10 +130,16 @@ void Fl_Pack::draw() {
tw += Fl::box_dw(box()); if (tw <= 0) tw = 1;
th += Fl::box_dh(box()); if (th <= 0) th = 1;
- if (tw != w() || th != h()) {Fl_Widget::resize(x(),y(),tw,th); d = FL_DAMAGE_ALL;}
- if (d&FL_DAMAGE_ALL) draw_box();
+ if (tw != w() || th != h()) {
+ Fl_Widget::resize(x(),y(),tw,th);
+ d = FL_DAMAGE_ALL;
+ }
+ if (d&FL_DAMAGE_ALL) {
+ draw_box();
+ draw_label();
+ }
}
//
-// End of "$Id: Fl_Pack.cxx,v 1.6.2.4.2.6 2004/04/11 04:38:58 easysw Exp $".
+// End of "$Id: Fl_Pack.cxx,v 1.6.2.4.2.7 2004/04/25 01:39:36 easysw Exp $".
//