static const guint32 min_controls_per_column = 17, max_controls_per_column = 24;
static const float default_similarity_threshold = 0.3;
+static const guint32 max_columns_for_big_autostate = 2;
void
GenericPluginUI::build ()
// starting a new column when necessary.
i = 0;
+ size_t columns = 1;
for (vector<ControlUI*>::iterator cuip = cui_controls_list.begin(); cuip != cui_controls_list.end(); ++cuip, ++i) {
ControlUI* cui = *cuip;
frame->add (*box);
hpacker.pack_start(*frame, true, true);
x = 0;
+ ++columns;
} else {
HSeparator *split = new HSeparator();
split->set_size_request(-1, 5);
box->pack_start (*cui, false, false);
}
+ if (columns > max_columns_for_big_autostate) {
+ for (vector<ControlUI*>::iterator cuip = cui_controls_list.begin();
+ cuip != cui_controls_list.end();
+ ++cuip) {
+ set_short_autostate(*cuip, true);
+ }
+ }
+
if (is_scrollable) {
prefheight = 30 * i;
}
delete output_table;
}
- if (plugin->has_inline_display ()) {
+ if (plugin->has_inline_display () && plugin->inline_display_in_gui ()) {
PluginDisplay* pd = manage (new PluginDisplay (plugin, 300));
- pd->set_name("inside gui");
hpacker.pack_end (*pd, true, true);
}
show_all();
layout->attach (*cui, cui->x0, cui->x1, cui->y0, cui->y1, FILL, SHRINK, 2, 2);
}
hpacker.pack_start (*layout, true, true);
+
+ if (plugin->has_inline_display () && plugin->inline_display_in_gui ()) {
+ PluginDisplay* pd = manage (new PluginDisplay (plugin, 300));
+ hpacker.pack_end (*pd, true, true);
+ }
}
GenericPluginUI::ControlUI::ControlUI (const Evoral::Parameter& p)
automate_button.set_name ("plugin automation state button");
set_tooltip (automate_button, _("Automation control"));
- /* XXX translators: use a string here that will be at least as long
- as the longest automation label (see ::automation_state_changed()
- below). be sure to include a descender.
- */
-
- automate_button.set_sizing_text(_("Mgnual"));
-
ignore_change = false;
update_pending = false;
button = false;
}
}
+void
+GenericPluginUI::set_short_autostate (ControlUI* cui, bool value)
+{
+ cui->short_autostate = value;
+ if (value) {
+ cui->automate_button.set_sizing_text("M");
+ } else {
+ /* XXX translators: use a string here that will be at least as long
+ as the longest automation label (see ::automation_state_changed()
+ below). be sure to include a descender. */
+ cui->automate_button.set_sizing_text(_("Mgnual"));
+ }
+ automation_state_changed(cui);
+}
+
void
GenericPluginUI::automation_state_changed (ControlUI* cui)
{
cui->automate_button.set_active((state != ARDOUR::Off));
- if (cui->knobtable) {
+ if (cui->short_autostate) {
cui->automate_button.set_text (
GainMeterBase::astate_string (state));
return;
control_ui->label.set_alignment (0.0, 0.5);
control_ui->label.set_name ("PluginParameterLabel");
control_ui->set_spacing (5);
+ set_short_autostate(control_ui, false);
if (is_input) {
}
if (use_knob) {
- control_ui->automate_button.set_sizing_text("M");
+ set_short_autostate(control_ui, true);
control_ui->label.set_alignment (0.5, 0.5);
control_ui->knobtable = manage (new Table());