remove additional "mid" color from ArdourButton; replace Active/Mid widget state with ExplicitActive/ImplicitActive; represent implicit-active state with colored border around ArdourButton; tune button colors; new rounded_foo() functions, some in use, some not in use right now

git-svn-id: svn://localhost/ardour2/branches/3.0@11466 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-02-07 17:43:55 +00:00
parent 86a9d45ad0
commit b08d13706f
23 changed files with 310 additions and 409 deletions

View file

@ -115,10 +115,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
_vbox.pack_start (_button, true, true);
if (_processor->active()) {
_button.set_active_state (Gtkmm2ext::Active);
}
_button.set_active (_processor->active());
_button.show ();
_processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context());
@ -225,7 +222,7 @@ void
ProcessorEntry::led_clicked()
{
if (_processor) {
if (_button.active_state() == Gtkmm2ext::Active) {
if (_button.get_active ()) {
_processor->deactivate ();
} else {
_processor->activate ();
@ -237,11 +234,7 @@ void
ProcessorEntry::processor_active_changed ()
{
if (_processor) {
if (_processor->active()) {
_button.set_active_state (Gtkmm2ext::Active);
} else {
_button.unset_active_state ();
}
_button.set_active (_processor->active());
}
}
@ -485,10 +478,10 @@ ProcessorEntry::Control::button_clicked ()
return;
}
bool const n = _button.active_state() == Gtkmm2ext::Active ? false : true;
c->set_value (n ? 1 : 0);
_button.set_active_state (n ? Gtkmm2ext::Active : Gtkmm2ext::ActiveState (0));
bool const n = _button.get_active ();
c->set_value (n ? 0 : 1);
_button.set_active (!n);
}
void
@ -503,7 +496,7 @@ ProcessorEntry::Control::control_changed ()
if (c->toggled ()) {
_button.set_active_state (c->get_value() > 0.5 ? Gtkmm2ext::Active : Gtkmm2ext::ActiveState (0));
_button.set_active (c->get_value() > 0.5);
} else {