mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
trigger page: trigger cue buttons red when cues are record-enabled
This commit is contained in:
parent
e2b9995bb0
commit
9e48633b82
2 changed files with 15 additions and 1 deletions
|
|
@ -75,6 +75,9 @@ CueEntry::CueEntry (Item* item, uint64_t cue_index)
|
||||||
name_text->set_ignore_events (false);
|
name_text->set_ignore_events (false);
|
||||||
name_text->show ();
|
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 */
|
/* watch for change in theme */
|
||||||
UIConfiguration::instance ().ParameterChanged.connect (sigc::mem_fun (*this, &CueEntry::ui_parameter_changed));
|
UIConfiguration::instance ().ParameterChanged.connect (sigc::mem_fun (*this, &CueEntry::ui_parameter_changed));
|
||||||
set_default_colors ();
|
set_default_colors ();
|
||||||
|
|
@ -113,7 +116,6 @@ CueEntry::_size_allocate (ArdourCanvas::Rect const& alloc)
|
||||||
{
|
{
|
||||||
ArdourCanvas::Rectangle::_size_allocate (alloc);
|
ArdourCanvas::Rectangle::_size_allocate (alloc);
|
||||||
|
|
||||||
const Distance width = _rect.width ();
|
|
||||||
const Distance height = _rect.height ();
|
const Distance height = _rect.height ();
|
||||||
|
|
||||||
const double scale = UIConfiguration::instance ().get_ui_scale ();
|
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"));
|
name_text->set_fill_color (UIConfiguration::instance ().color ("neutral:background"));
|
||||||
|
|
||||||
if (TriggerBox::cue_recording()) {
|
if (TriggerBox::cue_recording()) {
|
||||||
|
name_button->set_fill_color (UIConfiguration::instance ().color ("alert:ruddy"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
Gtkmm2ext::Bindings* CueBoxUI::bindings = 0;
|
||||||
Glib::RefPtr<Gtk::ActionGroup> CueBoxUI::trigger_actions;
|
Glib::RefPtr<Gtk::ActionGroup> CueBoxUI::trigger_actions;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,10 @@ private:
|
||||||
void ui_parameter_changed (std::string const& p);
|
void ui_parameter_changed (std::string const& p);
|
||||||
void set_default_colors ();
|
void set_default_colors ();
|
||||||
|
|
||||||
|
void rec_state_changed ();
|
||||||
|
|
||||||
|
PBD::ScopedConnectionList _session_connections;
|
||||||
|
|
||||||
uint64_t _cue_idx;
|
uint64_t _cue_idx;
|
||||||
double _poly_size;
|
double _poly_size;
|
||||||
double _poly_margin;
|
double _poly_margin;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue