Browse Source

Mixer: Attempt to improve the behavior of single-row display mode.

tags/non-daw-v1.1.0
Jonathan Moore Liles 14 years ago
parent
commit
6db8e2f3fa
2 changed files with 12 additions and 1 deletions
  1. +6
    -1
      FL/Fl_Flowpack.H
  2. +6
    -0
      Mixer/Mixer.C

+ 6
- 1
FL/Fl_Flowpack.H View File

@@ -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;


+ 6
- 0
Mixer/Mixer.C View File

@@ -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() )
{


Loading…
Cancel
Save