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 ) :
|
||||
Meter( X, Y, W, H, L )
|
||||
{
|
||||
tooltip( peak_string );
|
||||
|
||||
_last_drawn_hi_segment = 0;
|
||||
|
||||
pixels_per_segment( 4 );
|
||||
|
@ -111,6 +113,9 @@ DPM::resize ( int X, int Y, int W, int H )
|
|||
void
|
||||
DPM::draw ( void )
|
||||
{
|
||||
snprintf( peak_string, sizeof( peak_string ), "%.1f", peak() );
|
||||
tooltip( peak_string );
|
||||
|
||||
int v = pos( value() );
|
||||
int pv = pos( peak() );
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
class DPM : public Meter
|
||||
{
|
||||
char peak_string[10];
|
||||
|
||||
int _segments;
|
||||
int _pixels_per_segment;
|
||||
int _last_drawn_hi_segment;
|
||||
|
|
|
@ -34,8 +34,9 @@ protected:
|
|||
virtual void draw ( void ) = 0;
|
||||
virtual int handle ( int m )
|
||||
{
|
||||
|
||||
if ( m == FL_PUSH )
|
||||
if ( m == FL_ENTER || m == FL_LEAVE )
|
||||
return 1;
|
||||
else if ( m == FL_PUSH )
|
||||
{
|
||||
// if ( Fl::event_button3() )
|
||||
// hide();
|
||||
|
|
Loading…
Reference in New Issue