mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
allow to hide monitor-section processor box with processors
indicate processors by coloring the button instead.
This commit is contained in:
parent
dd9e0e49a0
commit
f09c1016d4
3 changed files with 10 additions and 11 deletions
|
|
@ -259,6 +259,7 @@
|
||||||
<ColorAlias name="midi input button: fill active" alias="color 48"/>
|
<ColorAlias name="midi input button: fill active" alias="color 48"/>
|
||||||
<ColorAlias name="monitor section button: fill active" alias="color 42"/>
|
<ColorAlias name="monitor section button: fill active" alias="color 42"/>
|
||||||
<ColorAlias name="monitor processors toggle: fill active" alias="color 42"/>
|
<ColorAlias name="monitor processors toggle: fill active" alias="color 42"/>
|
||||||
|
<ColorAlias name="monitor processors present: fill" alias="color 20"/>
|
||||||
<ColorAlias name="midi input button: led active" alias="color 4"/>
|
<ColorAlias name="midi input button: led active" alias="color 4"/>
|
||||||
<ColorAlias name="midi meter color0" alias="color 52"/>
|
<ColorAlias name="midi meter color0" alias="color 52"/>
|
||||||
<ColorAlias name="midi meter color1" alias="color 53"/>
|
<ColorAlias name="midi meter color1" alias="color 53"/>
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ MonitorSection::MonitorSection (Session* s)
|
||||||
|
|
||||||
proctoggle = ToggleAction::create ();
|
proctoggle = ToggleAction::create ();
|
||||||
toggle_processorbox_button.set_related_action (proctoggle);
|
toggle_processorbox_button.set_related_action (proctoggle);
|
||||||
proctoggle->signal_toggled().connect (sigc::mem_fun(*this, &MonitorSection::repack_processor_box), false);
|
proctoggle->signal_toggled().connect (sigc::mem_fun(*this, &MonitorSection::update_processor_box), false);
|
||||||
|
|
||||||
/* Knobs */
|
/* Knobs */
|
||||||
Label* solo_boost_label;
|
Label* solo_boost_label;
|
||||||
|
|
@ -477,7 +477,7 @@ MonitorSection::MonitorSection (Session* s)
|
||||||
_tearoff->tearoff_window().signal_key_press_event().connect (sigc::ptr_fun (forward_key_press), false);
|
_tearoff->tearoff_window().signal_key_press_event().connect (sigc::ptr_fun (forward_key_press), false);
|
||||||
|
|
||||||
update_output_display ();
|
update_output_display ();
|
||||||
repack_processor_box ();
|
update_processor_box ();
|
||||||
_ui_initialized = true;
|
_ui_initialized = true;
|
||||||
|
|
||||||
/* catch changes that affect us */
|
/* catch changes that affect us */
|
||||||
|
|
@ -513,16 +513,14 @@ MonitorSection::~MonitorSection ()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MonitorSection::repack_processor_box ()
|
MonitorSection::update_processor_box ()
|
||||||
{
|
{
|
||||||
bool show_processor_box = proctoggle->get_active ();
|
bool show_processor_box = proctoggle->get_active ();
|
||||||
|
|
||||||
if (count_processors () > 0) {
|
if (count_processors () > 0 && !show_processor_box) {
|
||||||
proctoggle->set_active (true);
|
toggle_processorbox_button.set_name (X_("monitor processors present"));
|
||||||
proctoggle->set_sensitive (false);
|
|
||||||
show_processor_box = true;
|
|
||||||
} else {
|
} else {
|
||||||
proctoggle->set_sensitive (true);
|
toggle_processorbox_button.set_name (X_("monitor processors toggle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insert_box->is_visible() == show_processor_box) {
|
if (insert_box->is_visible() == show_processor_box) {
|
||||||
|
|
@ -564,7 +562,7 @@ MonitorSection::set_session (Session* s)
|
||||||
insert_box->set_route (_route);
|
insert_box->set_route (_route);
|
||||||
_route->processors_changed.connect (*this, invalidator (*this), boost::bind (&MonitorSection::processors_changed, this, _1), gui_context());
|
_route->processors_changed.connect (*this, invalidator (*this), boost::bind (&MonitorSection::processors_changed, this, _1), gui_context());
|
||||||
if (_ui_initialized) {
|
if (_ui_initialized) {
|
||||||
repack_processor_box (); // too early
|
update_processor_box ();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* session with no monitor section */
|
/* session with no monitor section */
|
||||||
|
|
@ -1620,5 +1618,5 @@ MonitorSection::count_processors ()
|
||||||
void
|
void
|
||||||
MonitorSection::processors_changed (ARDOUR::RouteProcessorChange)
|
MonitorSection::processors_changed (ARDOUR::RouteProcessorChange)
|
||||||
{
|
{
|
||||||
repack_processor_box ();
|
update_processor_box ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class MonitorSection : public RouteUI
|
||||||
|
|
||||||
void port_connected_or_disconnected (boost::weak_ptr<ARDOUR::Port>, boost::weak_ptr<ARDOUR::Port>);
|
void port_connected_or_disconnected (boost::weak_ptr<ARDOUR::Port>, boost::weak_ptr<ARDOUR::Port>);
|
||||||
|
|
||||||
void repack_processor_box ();
|
void update_processor_box ();
|
||||||
|
|
||||||
ProcessorBox* insert_box;
|
ProcessorBox* insert_box;
|
||||||
PluginSelector* _plugin_selector;
|
PluginSelector* _plugin_selector;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue