13
0

leave route-button show/hide up to route-UI.

This commit is contained in:
Robin Gareus 2013-07-09 03:34:44 +02:00
parent 7a3ed5d758
commit 346bd82c73
2 changed files with 20 additions and 22 deletions

View File

@ -166,22 +166,12 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
namebx.pack_start(name_label, true, false, 3); namebx.pack_start(name_label, true, false, 3);
namebx.pack_start(number_label, true, false, 0); namebx.pack_start(number_label, true, false, 0);
Gtk::HBox *btnwrap; // horiz center, no expand gtk workaround recbox.pack_start(*rec_enable_button, true, false);
btnbox.pack_start(recbox, false, false, 1);
btnwrap = manage(new Gtk::HBox()); mutebox.pack_start(*mute_button, true, false);
btnwrap->pack_start(*rec_enable_button, true, false); btnbox.pack_start(mutebox, false, false, 1);
btnbox.pack_start(*btnwrap, false, false, 1); solobox.pack_start(*solo_button, true, false);
btnwrap->show(); btnbox.pack_start(solobox, false, false, 1);
btnwrap = manage(new Gtk::HBox());
btnwrap->pack_start(*mute_button, true, false);
btnbox.pack_start(*btnwrap, false, false, 1);
btnwrap->show();
btnwrap = manage(new Gtk::HBox());
btnwrap->pack_start(*solo_button, true, false);
btnbox.pack_start(*btnwrap, false, false, 1);
btnwrap->show();
rec_enable_button->set_corner_radius(2); rec_enable_button->set_corner_radius(2);
rec_enable_button->set_size_request(16, 16); rec_enable_button->set_size_request(16, 16);
@ -192,6 +182,10 @@ 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);
mutebox.set_size_request(16, 16);
solobox.set_size_request(16, 16);
recbox.set_size_request(16, 16);
update_button_box(); update_button_box();
pack_start (peakbx, false, false); pack_start (peakbx, false, false);
@ -512,21 +506,21 @@ MeterStrip::update_button_box ()
int height = 0; int height = 0;
if (_session->config.get_show_mute_on_meterbridge()) { if (_session->config.get_show_mute_on_meterbridge()) {
height += 18; height += 18;
if (mute_button) mute_button->show(); mutebox.w();
} else { } else {
if (mute_button) mute_button->hide(); mutebox.e();
} }
if (_session->config.get_show_solo_on_meterbridge()) { if (_session->config.get_show_solo_on_meterbridge()) {
height += 18; height += 18;
if (solo_button) solo_button->show(); solobox.>show();
} else { } else {
if (solo_button) solo_button->hide(); solobox.>hide();
} }
if (_session->config.get_show_rec_on_meterbridge()) { if (_session->config.get_show_rec_on_meterbridge()) {
height += 18; height += 18;
if (rec_enable_button) rec_enable_button->show(); recbox.show();
} else { } else {
if (rec_enable_button) rec_enable_button->hide(); recbox.hide();
} }
btnbox.set_size_request(16, height); btnbox.set_size_request(16, height);
check_resize(); check_resize();

View File

@ -96,6 +96,10 @@ class MeterStrip : public Gtk::VBox, public RouteUI
Gtk::DrawingArea meter_ticks1_area; Gtk::DrawingArea meter_ticks1_area;
Gtk::DrawingArea meter_ticks2_area; Gtk::DrawingArea meter_ticks2_area;
Gtk::HBox mutebox;
Gtk::HBox solobox;
Gtk::HBox recbox;
Gtk::Alignment meter_align; Gtk::Alignment meter_align;
Gtk::Alignment peak_align; Gtk::Alignment peak_align;
Gtk::HBox peakbx; Gtk::HBox peakbx;