Mixer: Work around some quirks in hints of some plugins.
This commit is contained in:
parent
963d926659
commit
933bfe882a
|
@ -109,11 +109,14 @@ Fl_DialX::draw ( void )
|
||||||
|
|
||||||
if ( Fl::belowmouse() == this )
|
if ( Fl::belowmouse() == this )
|
||||||
{
|
{
|
||||||
char s[10];
|
char s[128];
|
||||||
|
|
||||||
fl_font( FL_HELVETICA, 10 );
|
fl_font( FL_HELVETICA, 9 );
|
||||||
|
|
||||||
snprintf( s, sizeof( s ), "%.1f", value() );
|
char buf[128];
|
||||||
|
format(buf);
|
||||||
|
|
||||||
|
snprintf( s, sizeof( s ), buf, value() );
|
||||||
|
|
||||||
fl_color( FL_FOREGROUND_COLOR );
|
fl_color( FL_FOREGROUND_COLOR );
|
||||||
fl_draw( s, X, Y, S, S, FL_ALIGN_CENTER );
|
fl_draw( s, X, Y, S, S, FL_ALIGN_CENTER );
|
||||||
|
|
|
@ -231,6 +231,11 @@ Module_Parameter_Editor::make_controls ( void )
|
||||||
o->selection_color( fc );
|
o->selection_color( fc );
|
||||||
o->value( p->control_value() );
|
o->value( p->control_value() );
|
||||||
|
|
||||||
|
o->precision( 2 );
|
||||||
|
/* a couple of plugins have ridiculously small units */
|
||||||
|
if ( p->hints.maximum < 0.5f )
|
||||||
|
o->precision( 5 );
|
||||||
|
|
||||||
// o->step( fabs( ( o->maximum() - o->minimum() ) ) / 32.0f );
|
// o->step( fabs( ( o->maximum() - o->minimum() ) ) / 32.0f );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -259,6 +264,11 @@ Module_Parameter_Editor::make_controls ( void )
|
||||||
o->maximum( p->hints.minimum );
|
o->maximum( p->hints.minimum );
|
||||||
o->minimum( p->hints.maximum );
|
o->minimum( p->hints.maximum );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
o->precision( 2 );
|
||||||
|
/* a couple of plugins have ridiculously small units */
|
||||||
|
if ( p->hints.maximum < 0.5f )
|
||||||
|
o->precision( 5 );
|
||||||
|
|
||||||
o->textsize( 8 );
|
o->textsize( 8 );
|
||||||
o->box( FL_NO_BOX );
|
o->box( FL_NO_BOX );
|
||||||
|
|
|
@ -625,8 +625,8 @@ Plugin_Module::load ( unsigned long id )
|
||||||
|
|
||||||
if (LADSPA_IS_HINT_INTEGER(HintDesc)) {
|
if (LADSPA_IS_HINT_INTEGER(HintDesc)) {
|
||||||
if ( p.hints.ranged &&
|
if ( p.hints.ranged &&
|
||||||
0 == p.hints.minimum &&
|
0 == (int)p.hints.minimum &&
|
||||||
1 == p.hints.maximum )
|
1 == (int)p.hints.maximum )
|
||||||
p.hints.type = Port::Hints::BOOLEAN;
|
p.hints.type = Port::Hints::BOOLEAN;
|
||||||
else
|
else
|
||||||
p.hints.type = Port::Hints::INTEGER;
|
p.hints.type = Port::Hints::INTEGER;
|
||||||
|
|
Loading…
Reference in New Issue