Allow to limit strip-inline controls (GUI optimization)

This commit is contained in:
Robin Gareus 2018-10-31 23:43:39 +01:00
parent 63a4cc9cf6
commit a79fe23935
3 changed files with 20 additions and 0 deletions

View File

@ -218,6 +218,8 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
_processor->PropertyChanged.connect (name_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context());
_processor->ConfigurationChanged.connect (config_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_configuration_changed, this, _1, _2), gui_context());
const uint32_t limit_inline_controls = UIConfiguration::instance().get_max_inline_controls ();
set<Evoral::Parameter> p = _processor->what_can_be_automated ();
for (set<Evoral::Parameter>::iterator i = p.begin(); i != p.end(); ++i) {
@ -241,6 +243,10 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
/* Add non-Amp (Fader & Trim) controls to the processor box */
_vbox.pack_start (c->box);
}
if (limit_inline_controls > 0 && _controls.size() >= limit_inline_controls) {
break;
}
}
setup_tooltip ();

View File

@ -3805,6 +3805,19 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_default_narrow_ms)
));
ComboOption<uint32_t>* mic = new ComboOption<uint32_t> (
"max-inline-controls",
_("Limit inline-mixer-strip controls per plugin"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_max_inline_controls),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_max_inline_controls)
);
mic->add (0, _("Unlimited"));
mic->add (16, _("16 parameters"));
mic->add (32, _("32 parameters"));
mic->add (64, _("64 parameters"));
mic->add (128, _("128 parameters"));
add_option (_("Appearance/Mixer"), mic);
add_option (_("Appearance/Mixer"), new OptionEditorBlank ());
add_option (_("Appearance/Toolbar"), new OptionEditorHeading (_("Main Transport Toolbar Items")));

View File

@ -96,6 +96,7 @@ UI_CONFIG_VARIABLE (std::string, xjadeo_binary, "xjadeo-binary", "")
UI_CONFIG_VARIABLE (bool, open_gui_after_adding_plugin, "open-gui-after-adding-plugin", true)
UI_CONFIG_VARIABLE (bool, show_inline_display_by_default, "show-inline-display-by-default", true)
UI_CONFIG_VARIABLE (bool, prefer_inline_over_gui, "prefer-inline-over-gui", true)
UI_CONFIG_VARIABLE (uint32_t, max_inline_controls, "max-inline-controls", 32) /* per processor */
UI_CONFIG_VARIABLE (uint32_t, action_table_columns, "action-table-columns", 0)
UI_CONFIG_VARIABLE (bool, use_wm_visibility, "use-wm-visibility", true)
UI_CONFIG_VARIABLE (std::string, stripable_color_palette, "stripable-color-palette", "#AA3939:#FFAAAA:#D46A6A:#801515:#550000:#AA8E39:#FFEAAA:#D4BA6A:#806515:#554000:#343477:#8080B3:#565695:#1A1A59:#09093B:#2D882D:#88CC88:#55AA55:#116611:#004400") /* Gtk::ColorSelection::palette_to_string */