Mixer: Tweak module appearance.

This commit is contained in:
Jonathan Moore Liles 2013-03-15 17:49:17 -07:00
parent d86cda8977
commit 0e467993a2
5 changed files with 11 additions and 21 deletions

View File

@ -508,7 +508,6 @@ Chain::add ( Controller_Module *m )
bool
Chain::insert ( Module *m, Module *n )
{
engine()->lock();
if ( !m )
@ -614,7 +613,7 @@ Chain::draw_connections ( Module *m )
fl_push_clip( X, Y, W, H );
Fl_Color c =fl_color_average( FL_WHITE, FL_YELLOW, 0.50 );
Fl_Color c = FL_FOREGROUND_COLOR;
fl_color( c );
if ( m->ninputs() )

View File

@ -362,8 +362,8 @@ Controller_Module::connect_to ( Port *p )
w = o;
o->type(4);
o->color(FL_BACKGROUND_COLOR);
o->selection_color((Fl_Color)1);
o->color(FL_DARK1);
o->selection_color(FL_RED);
o->minimum(1.5);
o->maximum(0);
o->value(1);

View File

@ -49,7 +49,7 @@ DPM::DPM ( int X, int Y, int W, int H, const char *L ) :
// resize( X, Y, W, H );
dim( 0.70f );
dim( 0.85f );
/* initialize gradients */
if ( DPM::_gradient[ 0 ] == 0 )

View File

@ -39,7 +39,7 @@ const float METER_UPDATE_FREQ = 0.2f;
Meter_Module::Meter_Module ( )
: Module ( 50, 100, name() )
{
box( FL_THIN_UP_FRAME );
box( FL_NO_BOX );
dpm_pack = new Fl_Scalepack( x(), y(), w(), h() );
dpm_pack->type( FL_HORIZONTAL );

View File

@ -128,7 +128,7 @@ Module::init ( void )
labeltype( FL_NO_LABEL );
set_visible_focus();
selection_color( FL_RED );
color( fl_color_average( FL_GREEN, FL_GRAY, 0.4 ) );
color( fl_color_average( FL_WHITE, FL_CYAN, 0.40 ) );
}
@ -575,20 +575,16 @@ Module::draw_label ( void )
const char *lp = label();
int l = strlen( label() );
fl_color( fl_contrast( FL_FOREGROUND_COLOR, bypass() ? FL_BLACK : color() ) );
Fl_Color c = FL_FOREGROUND_COLOR;
fl_font( FL_HELVETICA, 12 );
if ( bypass() || ! active() )
c = FL_BLACK;
fl_color( fl_contrast( c, is_default() ? FL_BLACK : color() ) );
int LW = fl_width( lp );
char *s = NULL;
if ( l > 10 )
if ( LW > tw )
{
s = new char[l];
s = new char[strlen(lp)];
char *sp = s;
for ( ; *lp; ++lp )
@ -603,11 +599,6 @@ Module::draw_label ( void )
}
if ( l > 20 )
fl_font( FL_HELVETICA, 10 );
else
fl_font( FL_HELVETICA, 14 );
fl_draw( s ? s : lp, tx, ty, tw, th, (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP ) );
if ( s )