mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
allow to include In/Disk button on Meterbridge
This commit is contained in:
parent
8c2cc85e8f
commit
982c38dda1
4 changed files with 38 additions and 0 deletions
|
|
@ -177,6 +177,11 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
||||||
namebx.set_size_request(18, 52);
|
namebx.set_size_request(18, 52);
|
||||||
namebx.pack_start(name_label, true, false, 3);
|
namebx.pack_start(name_label, true, false, 3);
|
||||||
|
|
||||||
|
mon_in_box.pack_start(*monitor_input_button, true, false);
|
||||||
|
btnbox.pack_start(mon_in_box, false, false, 1);
|
||||||
|
mon_disk_box.pack_start(*monitor_disk_button, true, false);
|
||||||
|
btnbox.pack_start(mon_disk_box, false, false, 1);
|
||||||
|
|
||||||
recbox.pack_start(*rec_enable_button, true, false);
|
recbox.pack_start(*rec_enable_button, true, false);
|
||||||
btnbox.pack_start(recbox, false, false, 1);
|
btnbox.pack_start(recbox, false, false, 1);
|
||||||
mutebox.pack_start(*mute_button, true, false);
|
mutebox.pack_start(*mute_button, true, false);
|
||||||
|
|
@ -193,9 +198,17 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
||||||
solo_button->set_corner_radius(2);
|
solo_button->set_corner_radius(2);
|
||||||
solo_button->set_size_request(16, 16);
|
solo_button->set_size_request(16, 16);
|
||||||
|
|
||||||
|
monitor_input_button->set_corner_radius(2);
|
||||||
|
monitor_input_button->set_size_request(16, 16);
|
||||||
|
|
||||||
|
monitor_disk_button->set_corner_radius(2);
|
||||||
|
monitor_disk_button->set_size_request(16, 16);
|
||||||
|
|
||||||
mutebox.set_size_request(16, 16);
|
mutebox.set_size_request(16, 16);
|
||||||
solobox.set_size_request(16, 16);
|
solobox.set_size_request(16, 16);
|
||||||
recbox.set_size_request(16, 16);
|
recbox.set_size_request(16, 16);
|
||||||
|
mon_in_box.set_size_request(16, 16);
|
||||||
|
mon_disk_box.set_size_request(16, 16);
|
||||||
spacer.set_size_request(-1,0);
|
spacer.set_size_request(-1,0);
|
||||||
|
|
||||||
update_button_box();
|
update_button_box();
|
||||||
|
|
@ -232,6 +245,8 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
||||||
mtr_container.show();
|
mtr_container.show();
|
||||||
mtr_hsep.show();
|
mtr_hsep.show();
|
||||||
nfo_vbox.show();
|
nfo_vbox.show();
|
||||||
|
monitor_input_button->show();
|
||||||
|
monitor_disk_button->show();
|
||||||
|
|
||||||
_route->shared_peak_meter()->ConfigurationChanged.connect (
|
_route->shared_peak_meter()->ConfigurationChanged.connect (
|
||||||
route_connections, invalidator (*this), boost::bind (&MeterStrip::meter_configuration_changed, this, _1), gui_context()
|
route_connections, invalidator (*this), boost::bind (&MeterStrip::meter_configuration_changed, this, _1), gui_context()
|
||||||
|
|
@ -339,6 +354,8 @@ MeterStrip::set_button_names()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
monitor_input_button->set_text (_("I"));
|
||||||
|
monitor_disk_button->set_text (_("D"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -651,6 +668,14 @@ MeterStrip::update_button_box ()
|
||||||
} else {
|
} else {
|
||||||
recbox.hide();
|
recbox.hide();
|
||||||
}
|
}
|
||||||
|
if (_session->config.get_show_monitor_on_meterbridge()) {
|
||||||
|
height += 18 + 18;
|
||||||
|
mon_in_box.show();
|
||||||
|
mon_disk_box.show();
|
||||||
|
} else {
|
||||||
|
mon_in_box.hide();
|
||||||
|
mon_disk_box.hide();
|
||||||
|
}
|
||||||
btnbox.set_size_request(16, height);
|
btnbox.set_size_request(16, height);
|
||||||
check_resize();
|
check_resize();
|
||||||
}
|
}
|
||||||
|
|
@ -684,6 +709,9 @@ MeterStrip::parameter_changed (std::string const & p)
|
||||||
else if (p == "show-name-on-meterbridge") {
|
else if (p == "show-name-on-meterbridge") {
|
||||||
update_name_box();
|
update_name_box();
|
||||||
}
|
}
|
||||||
|
else if (p == "show-monitor-on-meterbridge") {
|
||||||
|
update_button_box();
|
||||||
|
}
|
||||||
else if (p == "meterbridge-label-height") {
|
else if (p == "meterbridge-label-height") {
|
||||||
queue_resize();
|
queue_resize();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,8 @@ class MeterStrip : public Gtk::VBox, public RouteUI
|
||||||
Gtk::HBox mutebox;
|
Gtk::HBox mutebox;
|
||||||
Gtk::HBox solobox;
|
Gtk::HBox solobox;
|
||||||
Gtk::HBox recbox;
|
Gtk::HBox recbox;
|
||||||
|
Gtk::HBox mon_in_box;
|
||||||
|
Gtk::HBox mon_disk_box;
|
||||||
|
|
||||||
Gtk::Alignment meter_align;
|
Gtk::Alignment meter_align;
|
||||||
Gtk::Alignment peak_align;
|
Gtk::Alignment peak_align;
|
||||||
|
|
|
||||||
|
|
@ -318,6 +318,13 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||||
sigc::mem_fun (*_session_config, &SessionConfiguration::set_show_solo_on_meterbridge)
|
sigc::mem_fun (*_session_config, &SessionConfiguration::set_show_solo_on_meterbridge)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
add_option (_("Meterbridge"), new BoolOption (
|
||||||
|
"show-monitor-on-meterbridge",
|
||||||
|
_("Monitor Buttons"),
|
||||||
|
sigc::mem_fun (*_session_config, &SessionConfiguration::get_show_monitor_on_meterbridge),
|
||||||
|
sigc::mem_fun (*_session_config, &SessionConfiguration::set_show_monitor_on_meterbridge)
|
||||||
|
));
|
||||||
|
|
||||||
add_option (_("Meterbridge"), new OptionEditorHeading (_("Name Labels")));
|
add_option (_("Meterbridge"), new OptionEditorHeading (_("Name Labels")));
|
||||||
|
|
||||||
add_option (_("Meterbridge"), new BoolOption (
|
add_option (_("Meterbridge"), new BoolOption (
|
||||||
|
|
|
||||||
|
|
@ -63,5 +63,6 @@ CONFIG_VARIABLE (bool, show_midi_on_meterbridge, "show-midi-on-meterbridge", tru
|
||||||
CONFIG_VARIABLE (bool, show_rec_on_meterbridge, "show-rec-on-meterbridge", true)
|
CONFIG_VARIABLE (bool, show_rec_on_meterbridge, "show-rec-on-meterbridge", true)
|
||||||
CONFIG_VARIABLE (bool, show_mute_on_meterbridge, "show-mute-on-meterbridge", false)
|
CONFIG_VARIABLE (bool, show_mute_on_meterbridge, "show-mute-on-meterbridge", false)
|
||||||
CONFIG_VARIABLE (bool, show_solo_on_meterbridge, "show-solo-on-meterbridge", false)
|
CONFIG_VARIABLE (bool, show_solo_on_meterbridge, "show-solo-on-meterbridge", false)
|
||||||
|
CONFIG_VARIABLE (bool, show_monitor_on_meterbridge, "show-monitor-on-meterbridge", false)
|
||||||
CONFIG_VARIABLE (bool, show_name_on_meterbridge, "show-name-on-meterbridge", true)
|
CONFIG_VARIABLE (bool, show_name_on_meterbridge, "show-name-on-meterbridge", true)
|
||||||
CONFIG_VARIABLE (uint32_t, meterbridge_label_height, "meterbridge-label-height", 0)
|
CONFIG_VARIABLE (uint32_t, meterbridge_label_height, "meterbridge-label-height", 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue