don't show meter for integer/enum outputs in a generic plugin UI
This commit is contained in:
parent
99a996e836
commit
9a7fbd53a2
|
@ -762,8 +762,14 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
|
|||
|
||||
control_ui->display->show_all ();
|
||||
|
||||
/* set up a meter */
|
||||
/* TODO: only make a meter if the port is Hinted for it */
|
||||
control_ui->vbox = manage (new VBox);
|
||||
control_ui->vbox->set_spacing(3);
|
||||
|
||||
if (desc.integer_step || desc.enumeration) {
|
||||
control_ui->vbox->pack_end (*control_ui->display, false, false);
|
||||
control_ui->vbox->pack_end (control_ui->label, false, false);
|
||||
} else {
|
||||
/* set up a meter for float ports */
|
||||
|
||||
MeterInfo * info = new MeterInfo();
|
||||
control_ui->meterinfo = info;
|
||||
|
@ -786,24 +792,25 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
|
|||
info->min = desc.lower;
|
||||
info->max = desc.upper;
|
||||
|
||||
control_ui->vbox = manage (new VBox);
|
||||
control_ui->hbox = manage (new HBox);
|
||||
|
||||
control_ui->hbox->set_spacing(1);
|
||||
control_ui->vbox->set_spacing(3);
|
||||
|
||||
control_ui->label.set_angle(90);
|
||||
control_ui->hbox->pack_start (control_ui->label, false, false);
|
||||
control_ui->hbox->pack_start (*info->meter, false, false);
|
||||
|
||||
HBox* center = manage (new HBox);
|
||||
center->set_spacing(1);
|
||||
center->pack_start (control_ui->label, false, false);
|
||||
center->pack_start (*info->meter, false, false);
|
||||
|
||||
control_ui->hbox = manage (new HBox);
|
||||
control_ui->hbox->pack_start (*center, true, false);
|
||||
|
||||
// horizontally center this hbox in the vbox
|
||||
control_ui->vbox->pack_start (*control_ui->hbox, false, false);
|
||||
|
||||
control_ui->vbox->pack_start (*control_ui->display, false, false);
|
||||
|
||||
control_ui->pack_start (*control_ui->vbox);
|
||||
|
||||
control_ui->meterinfo->meter->show_all();
|
||||
control_ui->meterinfo->packed = true;
|
||||
control_ui->vbox->pack_start (*control_ui->display, false, false);
|
||||
}
|
||||
|
||||
control_ui->pack_start (*control_ui->vbox);
|
||||
|
||||
output_controls.push_back (control_ui);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user