use colors for non-active automation lines in MidiCueEditor

Currently this just uses random ("nonexistent") colors; to be changed to
some palette next
This commit is contained in:
Paul Davis 2025-01-06 12:56:05 -07:00
parent e7ac13a834
commit 32f074bdd4
2 changed files with 29 additions and 10 deletions

View file

@ -147,7 +147,11 @@ AutomationLine::set_sensitive (bool yn)
{
_sensitive = yn;
if (yn) {
set_line_color (_line_color_name);
} else {
set_line_color (UIConfiguration::instance().color ("nonexistent"));
}
for (auto & cp : control_points) {
if (yn) {
@ -308,6 +312,29 @@ AutomationLine::set_line_color (string const & color_name, string color_mod)
Gtkmm2ext::SVAModifier mod = UIConfiguration::instance().modifier (color_mod.empty () ? "automation line fill" : color_mod);
line->set_fill_color ((line->outline_color() & 0xffffff00) + (mod.a() * 255));
line->set_fill (true);
if (_control_points_inherit_color) {
for (auto & cp : control_points) {
cp->set_color ();
}
}
}
void
AutomationLine::set_colors ()
{
set_line_color (_line_color_name);
for (auto & cp : control_points) {
cp->set_color ();
}
}
void
AutomationLine::set_line_color (uint32_t color)
{
line->set_outline_color (color);
line->set_fill (false);
if (_control_points_inherit_color) {
for (auto & cp : control_points) {
@ -1062,15 +1089,6 @@ AutomationLine::set_selected_points (PointSelection const & points)
set_colors ();
}
void
AutomationLine::set_colors ()
{
set_line_color (_line_color_name);
for (auto & cp : control_points) {
cp->set_color ();
}
}
void
AutomationLine::list_changed ()
{

View file

@ -114,6 +114,7 @@ public:
guint32 height() const { return _height; }
void set_line_color (std::string const & color, std::string color_mode = std::string());
void set_line_color (uint32_t color);
uint32_t get_line_color() const;
uint32_t get_line_fill_color() const;
uint32_t get_line_selected_color() const;