diff --git a/mixer/src/DPM.C b/mixer/src/DPM.C index 3a50e1b..0873165 100644 --- a/mixer/src/DPM.C +++ b/mixer/src/DPM.C @@ -51,7 +51,7 @@ DPM::DPM ( int X, int Y, int W, int H, const char *L ) : dim( 0.85f ); - box( FL_FLAT_BOX ); + box( FL_NO_BOX ); color( fl_color_average( FL_BLACK, FL_BACKGROUND_COLOR, 0.66f ) ); /* initialize gradients */ @@ -136,10 +136,14 @@ DPM::resize ( int X, int Y, int W, int H ) void DPM::bbox ( int &X, int &Y, int &W, int &H ) { - X = x() + 2; - Y = y() + 2; - W = w() - 4; - H = h() - 4; + /* X = x() + 2; */ + /* Y = y() + 2; */ + /* W = w() - 4; */ + /* H = h() - 4; */ + X = x(); + Y = y(); + W = w(); + H = h(); } void @@ -151,6 +155,9 @@ DPM::draw ( void ) int X,Y,W,H; bbox(X,Y,W,H); + if ( 0 == fl_not_clipped(X,Y,W,H ) ) + return; + int v = pos( value() ); int pv = pos( peak() ); @@ -165,9 +172,9 @@ DPM::draw ( void ) { draw_label(); - draw_box( FL_FLAT_BOX, x(), y(), w(), h(), FL_DARK1 ); + draw_box( FL_FLAT_BOX, X, Y, W, H, FL_BACKGROUND_COLOR ); } - + fl_push_clip( X, Y, W, H ); const int active = active_r(); @@ -221,7 +228,7 @@ DPM::draw ( void ) if ( type() == FL_HORIZONTAL ) { xx = X + p * bw; - fl_rectf( X + (p * bw), Y, bw, H, c ); + fl_rectf( xx, Y, bw, H, c ); } else { @@ -229,19 +236,19 @@ DPM::draw ( void ) fl_rectf( X, yy, W, bh, c ); } - if ( _pixels_per_segment >= 3 ) - { - fl_color( FL_DARK1 ); + /* if ( _pixels_per_segment >= 3 ) */ + /* { */ + /* fl_color( FL_DARK1 ); */ - if ( type() == FL_HORIZONTAL ) - { - fl_line( xx, Y, xx, Y + H - 1 ); - } - else - { - fl_line( X, yy, X + W - 1, yy ); - } - } + /* if ( type() == FL_HORIZONTAL ) */ + /* { */ + /* fl_line( xx, Y, xx, Y + H - 1 ); */ + /* } */ + /* else */ + /* { */ + /* fl_line( X, yy, X + W - 1, yy ); */ + /* } */ + /* } */ /* } */ /* else */ diff --git a/mixer/src/DPM.H b/mixer/src/DPM.H index e41ad3f..18e694a 100644 --- a/mixer/src/DPM.H +++ b/mixer/src/DPM.H @@ -102,6 +102,6 @@ public: } for ( int i = 0; i < 128; i++ ) - _dim_gradient[ i ] = fl_color_average( bc, _gradient[ i ], _dim ); + _dim_gradient[ i ] = fl_color_average( FL_BLACK, _gradient[ i ], _dim ); } }; diff --git a/mixer/src/Meter_Indicator_Module.C b/mixer/src/Meter_Indicator_Module.C index df23d3b..8bc40b9 100644 --- a/mixer/src/Meter_Indicator_Module.C +++ b/mixer/src/Meter_Indicator_Module.C @@ -57,7 +57,8 @@ Meter_Indicator_Module::Meter_Indicator_Module ( bool is_default ) dpm_pack->color( FL_BACKGROUND_COLOR ); dpm_pack->box( FL_FLAT_BOX ); dpm_pack->type( FL_HORIZONTAL ); - + dpm_pack->spacing(1); + end(); control_value = new float[1];