diff --git a/FL/Fl_Flowpack.H b/FL/Fl_Flowpack.H index 1df200f..d283bf8 100644 --- a/FL/Fl_Flowpack.H +++ b/FL/Fl_Flowpack.H @@ -26,6 +26,7 @@ class Fl_Flowpack : public Fl_Group int _hspacing; int _vspacing; int _max_width; + bool _flow; public: @@ -34,6 +35,7 @@ public: { resizable( 0 ); _max_width = _hspacing = _vspacing = 0; + _flow = 0; } virtual ~Fl_Flowpack ( ) @@ -48,6 +50,9 @@ public: void hspacing ( int h ) { _hspacing = h; } int hspacing ( void ) const { return _hspacing; }; + bool flow ( void ) const { return _flow; } + void flow ( bool v ) { _flow = v; } + void add ( Fl_Widget *w ) { @@ -100,7 +105,7 @@ public: H = o->h() > H ? o->h() : H; - if ( X + o->w() >= W ) + if ( _flow && X + o->w() >= W ) { Y += H + _vspacing; diff --git a/Mixer/Mixer.C b/Mixer/Mixer.C index 5e0aa33..75252c4 100644 --- a/Mixer/Mixer.C +++ b/Mixer/Mixer.C @@ -367,9 +367,15 @@ Mixer::rows ( int n ) int sh; if ( n > 1 ) + { sh = (scroll->h() / n) - (mixer_strips->vspacing() * (n - 1)); + mixer_strips->flow( true ); + } else + { sh = (scroll->h() - 18) / n; + mixer_strips->flow( false ); + } if ( sh < Mixer_Strip::min_h() ) {