Allow peeking at the next round-robin color to be used

This commit is contained in:
Ben Loftis 2025-01-09 11:03:19 -06:00 committed by Robin Gareus
parent 8899ad836e
commit b9c531cf7f
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 6 additions and 2 deletions

View file

@ -711,7 +711,7 @@ ARDOUR_UI_UTILS::escape_underscores (string const& s)
}
Gdk::Color
ARDOUR_UI_UTILS::round_robin_palette_color ()
ARDOUR_UI_UTILS::round_robin_palette_color (bool just_peek)
{
Gdk::Color newcolor;
string cp = UIConfiguration::instance ().get_stripable_color_palette ();
@ -719,6 +719,10 @@ ARDOUR_UI_UTILS::round_robin_palette_color ()
std::vector<Gdk::Color> c (gc);
static std::vector<Gdk::Color>::size_type index = 0;
if(just_peek) {
return c[index];
}
if (index >= c.size ()) {
index = 0;
}