Mixer: Tweak module colors. Show LADSPA plugins in a different color.
This commit is contained in:
parent
55de086026
commit
a7a7b967c8
|
@ -20,6 +20,7 @@
|
||||||
#include "Module.H"
|
#include "Module.H"
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <FL/fl_ask.H>
|
#include <FL/fl_ask.H>
|
||||||
|
#include <FL/Enumerations.H>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -173,7 +174,9 @@ Module::init ( void )
|
||||||
selection_color( FL_YELLOW );
|
selection_color( FL_YELLOW );
|
||||||
|
|
||||||
labelsize(12);
|
labelsize(12);
|
||||||
color( fl_rgb_color( 122,190,200 ) );
|
|
||||||
|
color( fl_color_average( fl_rgb_color( 0x3a, 0x99, 0x7c ), FL_BACKGROUND_COLOR, 1.0f ));
|
||||||
|
|
||||||
tooltip();
|
tooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,6 +689,9 @@ Module::draw_box ( int tx, int ty, int tw, int th )
|
||||||
|
|
||||||
Fl_Color c = color();
|
Fl_Color c = color();
|
||||||
|
|
||||||
|
if ( bypass() )
|
||||||
|
c = fl_darker(fl_darker(c));
|
||||||
|
|
||||||
if ( ! active_r() )
|
if ( ! active_r() )
|
||||||
c = fl_inactive( c );
|
c = fl_inactive( c );
|
||||||
|
|
||||||
|
@ -776,8 +782,14 @@ Module::draw_label ( int tx, int ty, int tw, int th )
|
||||||
|
|
||||||
Fl_Color c = fl_contrast( FL_FOREGROUND_COLOR, color() );
|
Fl_Color c = fl_contrast( FL_FOREGROUND_COLOR, color() );
|
||||||
|
|
||||||
fl_color( active_r() && ! bypass() ? c : fl_inactive(c) );
|
if ( bypass() )
|
||||||
|
c = fl_darker(c);
|
||||||
|
|
||||||
|
/* fl_color( active_r() && ! bypass() ? c : fl_inactive(c) ); */
|
||||||
|
|
||||||
|
if ( !active_r() )
|
||||||
|
c = fl_inactive(c);
|
||||||
|
|
||||||
fl_font( FL_HELVETICA, labelsize() );
|
fl_font( FL_HELVETICA, labelsize() );
|
||||||
|
|
||||||
char *di = strstr( lab, " -" );
|
char *di = strstr( lab, " -" );
|
||||||
|
@ -826,15 +838,18 @@ Module::draw_label ( int tx, int ty, int tw, int th )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fl_color( c );
|
||||||
|
|
||||||
fl_draw( s ? s : lab, tx, ty, tw, th, align() | FL_ALIGN_CLIP );
|
fl_draw( s ? s : lab, tx, ty, tw, th, align() | FL_ALIGN_CLIP );
|
||||||
|
|
||||||
if ( bypass() )
|
/* if ( bypass() ) */
|
||||||
{
|
/* { */
|
||||||
fl_color( fl_color_add_alpha( fl_color(), 127 ) );
|
/* fl_color( fl_color_add_alpha( fl_color(), 127 ) ); */
|
||||||
fl_line_style( FL_SOLID, 2 );
|
/* fl_line_style( FL_SOLID, 2 ); */
|
||||||
fl_line( tx, ty + th * 0.5, tx + tw, ty + th * 0.5 );
|
/* fl_line( tx, ty + th * 0.5, tx + tw, ty + th * 0.5 ); */
|
||||||
fl_line_style( FL_SOLID, 0 );
|
/* fl_line_style( FL_SOLID, 0 ); */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
|
|
||||||
free(lab);
|
free(lab);
|
||||||
|
|
|
@ -66,6 +66,8 @@ Plugin_Module::Plugin_Module ( ) : Module( 50, 35, name() )
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
color( fl_color_average( fl_rgb_color( 0x99, 0x7c, 0x3a ), FL_BACKGROUND_COLOR, 1.0f ));
|
||||||
|
|
||||||
end();
|
end();
|
||||||
|
|
||||||
log_create();
|
log_create();
|
||||||
|
|
Loading…
Reference in New Issue