Browse Source

Mixer: change active/inactive coloring of modules to make deactivation more visible.

tags/non-daw-v1.2.0
Jonathan Moore Liles 12 years ago
parent
commit
70e0db1c47
3 changed files with 10 additions and 4 deletions
  1. +2
    -0
      mixer/src/JACK_Module.C
  2. +4
    -3
      mixer/src/Module.C
  3. +4
    -1
      mixer/src/Plugin_Module.C

+ 2
- 0
mixer/src/JACK_Module.C View File

@@ -63,6 +63,8 @@ JACK_Module::JACK_Module ( )
} }


end(); end();
color( FL_BLACK );


log_create(); log_create();
} }


+ 4
- 3
mixer/src/Module.C View File

@@ -128,6 +128,7 @@ Module::init ( void )
labeltype( FL_NO_LABEL ); labeltype( FL_NO_LABEL );
set_visible_focus(); set_visible_focus();
selection_color( FL_RED ); selection_color( FL_RED );
color( fl_color_average( FL_GREEN, FL_GRAY, 0.4 ) );
} }




@@ -531,14 +532,14 @@ Module::draw_box ( void )


fl_push_clip( tx, ty, tw, th ); fl_push_clip( tx, ty, tw, th );


Fl_Color c = is_default() ? FL_BLACK : color();
Fl_Color c = color();


c = active() && ! bypass() ? c : fl_inactive( c );
c = active() && ! bypass() ? c : FL_GRAY;


int spacing = w() / instances(); int spacing = w() / instances();
for ( int i = instances(); i--; ) for ( int i = instances(); i--; )
{ {
fl_draw_box( box(), tx + (spacing * i), ty, tw / instances(), th, Fl::belowmouse() == this ? fl_lighter( c ) : c );
fl_draw_box( box(), tx + (spacing * i), ty, tw / instances(), th, c );
} }


if ( this == Fl::focus() ) if ( this == Fl::focus() )


+ 4
- 1
mixer/src/Plugin_Module.C View File

@@ -174,7 +174,10 @@ Plugin_Module::init ( void )
_crosswire = false; _crosswire = false;


align( (Fl_Align)FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); align( (Fl_Align)FL_ALIGN_CENTER | FL_ALIGN_INSIDE );
color( (Fl_Color)fl_color_average( FL_BLUE, FL_GREEN, 0.5f ) );
color( (Fl_Color)fl_color_average( FL_BLUE, FL_GREEN, 0.5f ) );
// color( FL_FOREGROUND_COLOR );
/* color( fl_color_average( FL_CYAN, FL_WHITE, 0.40 ) ); */

int tw, th, tx, ty; int tw, th, tx, ty;


bbox( tx, ty, tw, th ); bbox( tx, ty, tw, th );


Loading…
Cancel
Save