Mixer: Show peak value in tooltip on DPMs.
This commit is contained in:
parent
3e929e4b98
commit
78718c45d8
|
@ -39,6 +39,8 @@ Fl_Color DPM::_dim_gradient[128];
|
||||||
DPM::DPM ( int X, int Y, int W, int H, const char *L ) :
|
DPM::DPM ( int X, int Y, int W, int H, const char *L ) :
|
||||||
Meter( X, Y, W, H, L )
|
Meter( X, Y, W, H, L )
|
||||||
{
|
{
|
||||||
|
tooltip( peak_string );
|
||||||
|
|
||||||
_last_drawn_hi_segment = 0;
|
_last_drawn_hi_segment = 0;
|
||||||
|
|
||||||
pixels_per_segment( 4 );
|
pixels_per_segment( 4 );
|
||||||
|
@ -111,6 +113,9 @@ DPM::resize ( int X, int Y, int W, int H )
|
||||||
void
|
void
|
||||||
DPM::draw ( void )
|
DPM::draw ( void )
|
||||||
{
|
{
|
||||||
|
snprintf( peak_string, sizeof( peak_string ), "%.1f", peak() );
|
||||||
|
tooltip( peak_string );
|
||||||
|
|
||||||
int v = pos( value() );
|
int v = pos( value() );
|
||||||
int pv = pos( peak() );
|
int pv = pos( peak() );
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
class DPM : public Meter
|
class DPM : public Meter
|
||||||
{
|
{
|
||||||
|
char peak_string[10];
|
||||||
|
|
||||||
int _segments;
|
int _segments;
|
||||||
int _pixels_per_segment;
|
int _pixels_per_segment;
|
||||||
int _last_drawn_hi_segment;
|
int _last_drawn_hi_segment;
|
||||||
|
|
|
@ -34,8 +34,9 @@ protected:
|
||||||
virtual void draw ( void ) = 0;
|
virtual void draw ( void ) = 0;
|
||||||
virtual int handle ( int m )
|
virtual int handle ( int m )
|
||||||
{
|
{
|
||||||
|
if ( m == FL_ENTER || m == FL_LEAVE )
|
||||||
if ( m == FL_PUSH )
|
return 1;
|
||||||
|
else if ( m == FL_PUSH )
|
||||||
{
|
{
|
||||||
// if ( Fl::event_button3() )
|
// if ( Fl::event_button3() )
|
||||||
// hide();
|
// hide();
|
||||||
|
|
Loading…
Reference in New Issue