diff --git a/mixer/src/Meter_Indicator_Module.C b/mixer/src/Meter_Indicator_Module.C index 56a5c49..0572536 100644 --- a/mixer/src/Meter_Indicator_Module.C +++ b/mixer/src/Meter_Indicator_Module.C @@ -31,6 +31,7 @@ #include "FL/Fl_Dial.H" #include "FL/Fl_Labelpad_Group.H" #include "FL/Fl_Scalepack.H" +#include #include "Chain.H" #include "DPM.H" @@ -43,7 +44,7 @@ Meter_Indicator_Module::Meter_Indicator_Module ( bool is_default ) : Module ( is_default, 50, 100, name() ) { box( FL_FLAT_BOX ); - color( FL_BLACK ); + color( fl_darker( fl_darker( FL_BACKGROUND_COLOR ))); _disable_context_menu = false; _pad = true; @@ -53,13 +54,13 @@ Meter_Indicator_Module::Meter_Indicator_Module ( bool is_default ) control_input[0].hints.visible = false; - dpm_pack = new Fl_Scalepack( x(), y(), w(), h() ); - dpm_pack->color( FL_BACKGROUND_COLOR ); - dpm_pack->box( FL_FLAT_BOX ); + dpm_pack = new Fl_Scalepack( x() + 2, y() + 2, w() - 4, h() - 4 ); + /* dpm_pack->color( FL_BACKGROUND_COLOR ); */ + dpm_pack->box( FL_NO_BOX ); dpm_pack->type( FL_HORIZONTAL ); - dpm_pack->spacing(2); - - end(); + dpm_pack->spacing(1); + + end(); control_value = new float[1]; *control_value = -70.0f; @@ -82,6 +83,23 @@ Meter_Indicator_Module::~Meter_Indicator_Module ( ) +void Meter_Indicator_Module::resize ( int X, int Y, int W, int H ) +{ + Fl_Group::resize(X,Y,W,H); + dpm_pack->resize( x() + 2, y() + 2, w() - 4, h() - 4 ); +} + +void +Meter_Indicator_Module::draw ( void ) +{ + /* draw_box(x(),y(),w(),h()); */ + + Fl_Group::draw(); + + fl_rect( x(), y(), w(), h(), fl_darker(FL_BACKGROUND_COLOR)); + fl_rect( x()+1, y()+1, w()-2, h()-2, fl_darker(fl_darker(FL_BACKGROUND_COLOR))); +} + void Meter_Indicator_Module::get ( Log_Entry &e ) const { diff --git a/mixer/src/Meter_Indicator_Module.H b/mixer/src/Meter_Indicator_Module.H index 960d17c..1b55664 100644 --- a/mixer/src/Meter_Indicator_Module.H +++ b/mixer/src/Meter_Indicator_Module.H @@ -70,12 +70,8 @@ protected: void get ( Log_Entry &e ) const; void set ( Log_Entry &e ); - virtual void draw ( void ) - { -// draw_box(); - Fl_Group::draw(); - } - + virtual void draw ( void ); + virtual void resize ( int X, int Y, int W, int H ); virtual int handle ( int m ); private: diff --git a/mixer/src/Meter_Module.C b/mixer/src/Meter_Module.C index 30876b3..160819d 100644 --- a/mixer/src/Meter_Module.C +++ b/mixer/src/Meter_Module.C @@ -22,6 +22,7 @@ #include #include #include +#include #include "FL/Fl_Scalepack.H" #include "FL/test_press.H" @@ -30,19 +31,19 @@ #include "DPM.H" #include "JACK/Port.H" #include "dsp.h" - Meter_Module::Meter_Module ( ) : Module ( 50, 100, name() ) { - box( FL_NO_BOX ); - dpm_pack = new Fl_Scalepack( x(), y(), w(), h() ); + box( FL_FLAT_BOX ); + dpm_pack = new Fl_Scalepack( x() + 2, y() + 2, w() - 4, h() - 4 ); dpm_pack->type( FL_HORIZONTAL ); - + dpm_pack->spacing( 1 ); + control_value = 0; - - color( FL_BLACK ); + + color( fl_darker( fl_darker( FL_BACKGROUND_COLOR ))); end(); @@ -70,6 +71,23 @@ Meter_Module::~Meter_Module ( ) +void Meter_Module::resize ( int X, int Y, int W, int H ) +{ + Fl_Group::resize(X,Y,W,H); + dpm_pack->resize( x() + 2, y() + 2, w() - 4, h() - 4 ); +} + +void +Meter_Module::draw ( void ) +{ + /* draw_box(x(),y(),w(),h()); */ + + Fl_Group::draw(); + + fl_rect( x(), y(), w(), h(), fl_darker(FL_BACKGROUND_COLOR)); + fl_rect( x()+1, y()+1, w()-2, h()-2, fl_darker(fl_darker(FL_BACKGROUND_COLOR))); +} + void Meter_Module::update ( void ) { diff --git a/mixer/src/Meter_Module.H b/mixer/src/Meter_Module.H index 2b3e72b..eee143f 100644 --- a/mixer/src/Meter_Module.H +++ b/mixer/src/Meter_Module.H @@ -47,5 +47,6 @@ protected: virtual int handle ( int m ); virtual void process ( nframes_t nframes ); - virtual void draw ( void ) { draw_box(x(),y(),w(),h()); } + virtual void draw ( void ); + virtual void resize ( int X, int Y, int W, int H ); };