diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2008-09-07 11:22:14 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2008-09-07 11:22:14 +0000 |
| commit | 84e98c0ce9e66b194c5982c841a0fd03e8022047 (patch) | |
| tree | c5876f5d1bce573e1dc4faa8ff4be18d437591f3 /src/Fl_Scroll.cxx | |
| parent | 2ca98888465cbb9218669710719780b4749529bd (diff) | |
modified resize behavior, as discussed in STR 2032.
Fl_Group.cxx: resizes itself before changing its children
Fl_Scroll.cxx: similar change
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6192 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Scroll.cxx')
| -rw-r--r-- | src/Fl_Scroll.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx index 44661fbb4..701aa2dd3 100644 --- a/src/Fl_Scroll.cxx +++ b/src/Fl_Scroll.cxx @@ -238,6 +238,8 @@ void Fl_Scroll::draw() { void Fl_Scroll::resize(int X, int Y, int W, int H) { int dx = X-x(), dy = Y-y(); + int dw = W-w(), dh = H-h(); + Fl_Widget::resize(X,Y,W,H); // resize _before_ moving children around fix_scrollbar_order(); // move all the children: Fl_Widget*const* a = array(); @@ -245,7 +247,7 @@ void Fl_Scroll::resize(int X, int Y, int W, int H) { Fl_Object* o = *a++; o->position(o->x()+dx, o->y()+dy); } - if (w()==W && h()==H) { + if (dw==0 && dh==0) { char pad = (scrollbar.visible() && hscrollbar.visible()); char al = (scrollbar.align()&FL_ALIGN_LEFT!=0); char at = (scrollbar.align()&FL_ALIGN_TOP!=0); @@ -255,7 +257,6 @@ void Fl_Scroll::resize(int X, int Y, int W, int H) { // FIXME recalculation of scrollbars needs to be moved out fo "draw()" (STR #1895) redraw(); // need full recalculation of scrollbars } - Fl_Widget::resize(X,Y,W,H); } void Fl_Scroll::scroll_to(int X, int Y) { |
