diff --git a/FL/Fl_Sometimes_Input.H b/FL/Fl_Sometimes_Input.H index 6964ac2..c25cbe3 100644 --- a/FL/Fl_Sometimes_Input.H +++ b/FL/Fl_Sometimes_Input.H @@ -38,6 +38,7 @@ public: { clear_visible_focus(); up_box( FL_NO_BOX ); + when(FL_WHEN_ENTER_KEY); } void up_box ( Fl_Boxtype b ) { _up_box = b; } @@ -51,7 +52,7 @@ public: else { fl_draw_box( up_box(), x(), y(), w(), h(), color() ); - fl_color( FL_FOREGROUND_COLOR /* textcolor() */ ); + fl_color( fl_contrast( textcolor(), color() ) ); fl_font( textfont(), textsize() ); fl_draw( value(), x(), y(), w(), h(), (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_CLIP) ); } diff --git a/mixer/src/Chain.C b/mixer/src/Chain.C index a57a05f..989ae2b 100644 --- a/mixer/src/Chain.C +++ b/mixer/src/Chain.C @@ -136,12 +136,13 @@ Chain::Chain ( ) : Fl_Group( 0, 0, 100, 100, "") o->end(); } { Fl_Group *o = control_tab = new Fl_Group( X, Y, W, H, "" ); - o->box( FL_NO_BOX ); + o->box( FL_FLAT_BOX ); + o->color( FL_BACKGROUND_COLOR ); o->labeltype( FL_NO_LABEL ); o->hide(); { Fl_Scroll *o = new Fl_Scroll( X, Y, W, H ); - o->color( FL_BACKGROUND_COLOR ); - o->box( FL_FLAT_BOX ); +// o->color( FL_BACKGROUND_COLOR ); + o->box( FL_NO_BOX ); o->type( Fl_Scroll::VERTICAL ); { Fl_Flowpack *o = controls_pack = new Fl_Flowpack( X, Y, W, H ); o->hspacing( 10 ); diff --git a/mixer/src/DPM.C b/mixer/src/DPM.C index f7e0fa7..818b693 100644 --- a/mixer/src/DPM.C +++ b/mixer/src/DPM.C @@ -26,7 +26,7 @@ /* we cache the gradient for (probably excessive) speed */ float DPM::_dim; -Fl_Color DPM::_gradient[128] = { (Fl_Color)-1 }; +Fl_Color DPM::_gradient[128] = { (Fl_Color)0 }; Fl_Color DPM::_dim_gradient[128]; #include @@ -52,7 +52,7 @@ DPM::DPM ( int X, int Y, int W, int H, const char *L ) : dim( 0.70f ); /* initialize gradients */ - if ( DPM::_gradient[ 0 ] == -1 ) + if ( DPM::_gradient[ 0 ] == 0 ) DPM::blend( FL_GREEN, FL_RED ); box( FL_ROUNDED_BOX ); @@ -121,6 +121,11 @@ DPM::draw ( void ) if ( ! fl_not_clipped( x(), y(), w(), h() ) ) return; + int X = x() + 2; + int Y = y() + 2; + int W = w() - 4; + int H = h() - 4; + int v = pos( value() ); int pv = pos( peak() ); @@ -128,8 +133,14 @@ DPM::draw ( void ) int bw = w() / _segments; if ( damage() == FL_DAMAGE_ALL ) + { draw_label(); + draw_box( FL_UP_FRAME, x(), y(), w(), h(), FL_BLACK ); + } + + fl_push_clip( X, Y, W, H ); + const int active = active_r(); int hi, lo; @@ -156,6 +167,7 @@ DPM::draw ( void ) _last_drawn_hi_segment = v; + for ( int p = lo; p <= hi; p++ ) { Fl_Color c = DPM::div_color( p ); @@ -166,26 +178,42 @@ DPM::draw ( void ) if ( ! active ) c = fl_inactive( c ); - if ( _pixels_per_segment < 4 ) + int yy = 0; + int xx = 0; + + if ( type() == FL_HORIZONTAL ) { - if ( type() == FL_HORIZONTAL ) - fl_rectf( x() + (p * bw), y(), bw, h(), c ); - else - fl_rectf( x(), y() + h() - ((p + 1) * bh), w(), bh, c ); + xx = X + p * bw; + fl_rectf( X + (p * bw), Y, bw, H, c ); } else { - if ( type() == FL_HORIZONTAL ) - fl_draw_box( box(), x() + (p * bw), y(), bw, h(), c ); - else - fl_draw_box( box(), x(), y() + h() - ((p + 1) * bh), w(), bh, c ); + yy = Y + H - ((p + 1) * bh); + fl_rectf( X, yy, W, bh, c ); } + + if ( _pixels_per_segment > 3 ) + { + fl_color( FL_BLACK ); -/* fl_color( c ); */ -/* fl_rectf( x(), y() + h() - (p * bh), w(), bh ); */ -/* fl_color( FL_BLACK ); */ -/* fl_rect( x(), y() + h() - (p * bh), w(), bh ); */ - - } + if ( type() == FL_HORIZONTAL ) + { + fl_line( xx, Y, xx, Y + H - 1 ); + } + else + { + fl_line( X, yy, X + W - 1, yy ); + } + } + /* } */ + /* else */ + /* { */ + /* if ( type() == FL_HORIZONTAL ) */ + /* fl_draw_box( box(), X + (p * bw), Y, bw, H, c ); */ + /* else */ + /* fl_draw_box( box(), X, Y + H - ((p + 1) * bh), W, bh, c ); */ + /* } */ + } + fl_pop_clip(); } diff --git a/mixer/src/Mixer_Strip.C b/mixer/src/Mixer_Strip.C index cb02364..d91d518 100644 --- a/mixer/src/Mixer_Strip.C +++ b/mixer/src/Mixer_Strip.C @@ -240,7 +240,10 @@ void Mixer_Strip::cb_handle(Fl_Widget* o) { command_close(); } else if ( o == name_field ) + { name( name_field->value() ); + take_focus(); + } else if ( o == width_button ) { if ( width_button->value() ) @@ -378,7 +381,6 @@ Mixer_Strip::init ( ) o->textcolor( FL_FOREGROUND_COLOR ); o->value( name() ); o->callback( cb_handle, (void*)this ); - } { Fl_Scalepack *o = new Fl_Scalepack( 7, 143, 110, 25 ); o->type( Fl_Pack::HORIZONTAL );