mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Allow peeking at the next round-robin color to be used
This commit is contained in:
parent
8899ad836e
commit
b9c531cf7f
2 changed files with 6 additions and 2 deletions
|
|
@ -711,7 +711,7 @@ ARDOUR_UI_UTILS::escape_underscores (string const& s)
|
||||||
}
|
}
|
||||||
|
|
||||||
Gdk::Color
|
Gdk::Color
|
||||||
ARDOUR_UI_UTILS::round_robin_palette_color ()
|
ARDOUR_UI_UTILS::round_robin_palette_color (bool just_peek)
|
||||||
{
|
{
|
||||||
Gdk::Color newcolor;
|
Gdk::Color newcolor;
|
||||||
string cp = UIConfiguration::instance ().get_stripable_color_palette ();
|
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);
|
std::vector<Gdk::Color> c (gc);
|
||||||
static std::vector<Gdk::Color>::size_type index = 0;
|
static std::vector<Gdk::Color>::size_type index = 0;
|
||||||
|
|
||||||
|
if(just_peek) {
|
||||||
|
return c[index];
|
||||||
|
}
|
||||||
|
|
||||||
if (index >= c.size ()) {
|
if (index >= c.size ()) {
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ void resize_window_to_proportion_of_monitor (Gtk::Window*, int, int);
|
||||||
|
|
||||||
std::string escape_underscores (std::string const &);
|
std::string escape_underscores (std::string const &);
|
||||||
|
|
||||||
Gdk::Color round_robin_palette_color ();
|
Gdk::Color round_robin_palette_color (bool just_peek = false);
|
||||||
Gdk::Color unique_random_color (std::list<Gdk::Color> &);
|
Gdk::Color unique_random_color (std::list<Gdk::Color> &);
|
||||||
|
|
||||||
std::string rate_as_string (float r);
|
std::string rate_as_string (float r);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue