Mixer: Restore display of module name in Module Parameter Editor.

This commit is contained in:
Jonathan Moore Liles 2012-03-03 13:21:18 -08:00
parent 60de871511
commit ba45c07b04
2 changed files with 17 additions and 6 deletions

View File

@ -47,6 +47,7 @@ Module_Parameter_Editor::Module_Parameter_Editor ( Module *module ) : Fl_Double_
{ {
_module = module; _module = module;
_resized = false; _resized = false;
_min_width = 100;
char lab[256]; char lab[256];
if ( strcmp( module->name(), module->label() ) ) if ( strcmp( module->name(), module->label() ) )
@ -61,12 +62,17 @@ Module_Parameter_Editor::Module_Parameter_Editor ( Module *module ) : Fl_Double_
copy_label( title ); copy_label( title );
{ Fl_Pack *o = main_pack = new Fl_Pack( 0, y(), w(), h() - 10 ); fl_font( FL_HELVETICA, 14 );
_min_width = 30 + fl_width( module->label() );
{ Fl_Pack *o = main_pack = new Fl_Pack( 0, 0, w(), h() - 10 );
o->type( FL_VERTICAL ); o->type( FL_VERTICAL );
/* o->label( strdup( lab ) ); */ o->label( module->label() );
/* o->labeltype( FL_SHADOW_LABEL ); */ o->labelfont( 2 );
/* o->labelsize( 18 ); */ o->labeltype( FL_SHADOW_LABEL );
/* o->align( FL_ALIGN_TOP | FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); */ o->labelsize( 14 );
o->align( FL_ALIGN_TOP | FL_ALIGN_RIGHT | FL_ALIGN_INSIDE );
{ Fl_Pack *o = new Fl_Pack( 0, 0, 50, 25 ); { Fl_Pack *o = new Fl_Pack( 0, 0, 50, 25 );
@ -322,8 +328,12 @@ Module_Parameter_Editor::make_controls ( void )
int width = control_pack->max_width() + 100; int width = control_pack->max_width() + 100;
int height = control_pack->h() + 50; int height = control_pack->h() + 50;
if ( width < _min_width )
width = _min_width;
main_pack->size( width, height ); main_pack->size( width, height );
size( width, height ); size( width, height );
size_range( width, height, width, height );
} }
void void

View File

@ -68,10 +68,11 @@ class Module_Parameter_Editor : public Fl_Double_Window
Fl_Flowpack *control_pack; Fl_Flowpack *control_pack;
Fl_Menu_Button *mode_choice; Fl_Menu_Button *mode_choice;
bool _resized; bool _resized;
int _min_width;
int azimuth_port_number; int azimuth_port_number;
int elevation_port_number; int elevation_port_number;
std::vector<Fl_Widget*> controls_by_port; std::vector<Fl_Widget*> controls_by_port;
public: public: