13
0

amend cb7bcb6d - locked-solo button style

This commit is contained in:
Robin Gareus 2013-07-11 02:31:30 +02:00
parent cb7bcb6d9f
commit 2b53ac2e31
4 changed files with 26 additions and 31 deletions

View File

@ -384,7 +384,7 @@ ArdourButton::render (cairo_t* cr)
if ((visual_state() & Gtkmm2ext::Insensitive)) {
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius);
cairo_set_source_rgba (cr, 0.505, 0.517, 0.525, 0.5);
cairo_set_source_rgba (cr, 0.505, 0.517, 0.525, 0.6);
cairo_fill (cr);
}

View File

@ -274,9 +274,9 @@ MeterStrip::set_button_names()
rec_enable_button->set_image (::get_icon (X_("record_normal_red")));
if (_route && _route->solo_safe()) {
solo_button->set_sensitive(false);
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
} else {
solo_button->set_sensitive(true);
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
}
if (!Config->get_solo_control_is_listen_control()) {
solo_button->set_text (_("S"));

View File

@ -414,7 +414,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
gpm.set_type (rt->meter_type());
middle_button_table.attach (gpm.gain_display,0,1,1,2);
middle_button_table.attach (gpm.gain_display,0,1,1,2, EXPAND|FILL, EXPAND);
middle_button_table.attach (gpm.peak_display,1,2,1,2);
if (solo_button->get_parent()) {
@ -1905,9 +1905,9 @@ MixerStrip::set_button_names ()
monitor_disk_button->set_text (_("Disk"));
if (_route && _route->solo_safe()) {
solo_button->set_sensitive(false);
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
} else {
solo_button->set_sensitive(true);
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
}
if (!Config->get_solo_control_is_listen_control()) {
solo_button->set_text (_("Solo"));
@ -1932,9 +1932,9 @@ MixerStrip::set_button_names ()
monitor_disk_button->set_text (_("D"));
if (_route && _route->solo_safe()) {
solo_button->set_sensitive(false);
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
} else {
solo_button->set_sensitive(true);
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
}
if (!Config->get_solo_control_is_listen_control()) {
solo_button->set_text (_("S"));

View File

@ -2396,31 +2396,26 @@ RouteTimeAxisView::remove_underlay (StreamView* v)
void
RouteTimeAxisView::set_button_names ()
{
if (_route && _route->solo_safe()) {
solo_button->remove ();
if (solo_safe_pixbuf == 0) {
solo_safe_pixbuf = ::get_icon("solo-safe-icon");
}
solo_button->set_image (solo_safe_pixbuf);
solo_button->set_text (string());
} else {
solo_button->set_image (Glib::RefPtr<Gdk::Pixbuf>());
if (Config->get_solo_control_is_listen_control()) {
switch (Config->get_listen_position()) {
case AfterFaderListen:
solo_button->set_text (_("A"));
if (_route && _route->solo_safe()) {
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
} else {
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
}
if (Config->get_solo_control_is_listen_control()) {
switch (Config->get_listen_position()) {
case AfterFaderListen:
solo_button->set_text (_("A"));
ARDOUR_UI::instance()->set_tip (*solo_button, _("After-fade listen (AFL)"));
break;
case PreFaderListen:
solo_button->set_text (_("P"));
break;
case PreFaderListen:
solo_button->set_text (_("P"));
ARDOUR_UI::instance()->set_tip (*solo_button, _("Pre-fade listen (PFL)"));
break;
}
} else {
solo_button->set_text (_("s"));
ARDOUR_UI::instance()->set_tip (*solo_button, _("Solo"));
}
}
break;
}
} else {
solo_button->set_text (_("s"));
ARDOUR_UI::instance()->set_tip (*solo_button, _("Solo"));
}
mute_button->set_text (_("m"));
}