Browse Source

Mixer: Tweak meter appearance.

tags/non-daw-v1.3.0
Jonathan Moore Liles 9 months ago
parent
commit
6673606262
4 changed files with 53 additions and 20 deletions
  1. +25
    -7
      mixer/src/Meter_Indicator_Module.C
  2. +2
    -6
      mixer/src/Meter_Indicator_Module.H
  3. +24
    -6
      mixer/src/Meter_Module.C
  4. +2
    -1
      mixer/src/Meter_Module.H

+ 25
- 7
mixer/src/Meter_Indicator_Module.C View File

@@ -31,6 +31,7 @@
#include "FL/Fl_Dial.H"
#include "FL/Fl_Labelpad_Group.H"
#include "FL/Fl_Scalepack.H"
#include <FL/fl_draw.H>

#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
{


+ 2
- 6
mixer/src/Meter_Indicator_Module.H View File

@@ -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:


+ 24
- 6
mixer/src/Meter_Module.C View File

@@ -22,6 +22,7 @@
#include <math.h>
#include <FL/Fl.H>
#include <FL/Fl_Single_Window.H>
#include <FL/fl_draw.H>

#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 )
{


+ 2
- 1
mixer/src/Meter_Module.H View File

@@ -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 );
};

Loading…
Cancel
Save