diff --git a/gtk2_ardour/cuebox_ui.cc b/gtk2_ardour/cuebox_ui.cc index 0e74f96843..3f41bba232 100644 --- a/gtk2_ardour/cuebox_ui.cc +++ b/gtk2_ardour/cuebox_ui.cc @@ -75,6 +75,9 @@ CueEntry::CueEntry (Item* item, uint64_t cue_index) name_text->set_ignore_events (false); name_text->show (); + /* watch for cue-recording state */ + TriggerBox::CueRecordingChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&CueEntry::rec_state_changed, this), gui_context ()); + /* watch for change in theme */ UIConfiguration::instance ().ParameterChanged.connect (sigc::mem_fun (*this, &CueEntry::ui_parameter_changed)); set_default_colors (); @@ -113,7 +116,6 @@ CueEntry::_size_allocate (ArdourCanvas::Rect const& alloc) { ArdourCanvas::Rectangle::_size_allocate (alloc); - const Distance width = _rect.width (); const Distance height = _rect.height (); const double scale = UIConfiguration::instance ().get_ui_scale (); @@ -204,6 +206,8 @@ CueEntry::set_default_colors () name_text->set_fill_color (UIConfiguration::instance ().color ("neutral:background")); if (TriggerBox::cue_recording()) { + name_button->set_fill_color (UIConfiguration::instance ().color ("alert:ruddy")); + } } void @@ -214,6 +218,12 @@ CueEntry::ui_parameter_changed (std::string const& p) } } +void +CueEntry::rec_state_changed () +{ + set_default_colors (); +} + Gtkmm2ext::Bindings* CueBoxUI::bindings = 0; Glib::RefPtr CueBoxUI::trigger_actions; diff --git a/gtk2_ardour/cuebox_ui.h b/gtk2_ardour/cuebox_ui.h index fcbdb3db84..4e2a1e1985 100644 --- a/gtk2_ardour/cuebox_ui.h +++ b/gtk2_ardour/cuebox_ui.h @@ -60,6 +60,10 @@ private: void ui_parameter_changed (std::string const& p); void set_default_colors (); + void rec_state_changed (); + + PBD::ScopedConnectionList _session_connections; + uint64_t _cue_idx; double _poly_size; double _poly_margin;