Clarify round-robin color palette API name

This commit is contained in:
Robin Gareus 2023-04-18 02:18:02 +02:00
parent 9e35a9da66
commit c228d05c47
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
6 changed files with 7 additions and 16 deletions

View File

@ -52,8 +52,6 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace ARDOUR_UI_UTILS;
list<Gdk::Color> AxisView::used_colors;
AxisView::AxisView ()
{
}
@ -63,9 +61,9 @@ AxisView::~AxisView()
}
Gdk::Color
AxisView::unique_random_color()
AxisView::round_robin_palette_color ()
{
return ARDOUR_UI_UTILS::unique_palette_color (used_colors);
return ARDOUR_UI_UTILS::round_robin_palette_color ();
}
string

View File

@ -122,19 +122,12 @@ public:
static GUIObjectState& gui_object_state();
void clear_property_cache() { property_hashtable.clear(); }
/**
* Generate a new random TrackView color, unique from those colors already used.
*
* @return the unique random color.
*/
static Gdk::Color unique_random_color();
static Gdk::Color round_robin_palette_color ();
protected:
AxisView ();
virtual ~AxisView();
static std::list<Gdk::Color> used_colors;
Gtk::Label name_label;
void set_name_ellipsize_mode ();

View File

@ -367,7 +367,7 @@ RouteUI::set_route (std::shared_ptr<Route> rp)
if (set_color_from_route()) {
if (UIConfiguration::instance().get_use_palette_for_new_route ()) {
set_color (gdk_color_to_rgba (AxisView::unique_random_color ()));
set_color (gdk_color_to_rgba (AxisView::round_robin_palette_color ()));
} else {
set_color (UIConfiguration::instance ().color (X_("neutral:midground")));
}

View File

@ -680,7 +680,7 @@ ARDOUR_UI_UTILS::escape_underscores (string const & s)
}
Gdk::Color
ARDOUR_UI_UTILS::unique_palette_color (list<Gdk::Color>& used_colors)
ARDOUR_UI_UTILS::round_robin_palette_color ()
{
Gdk::Color newcolor;
string cp = UIConfiguration::instance().get_stripable_color_palette ();

View File

@ -98,7 +98,7 @@ void resize_window_to_proportion_of_monitor (Gtk::Window*, int, int);
std::string escape_underscores (std::string const &);
Gdk::Color unique_palette_color (std::list<Gdk::Color> &);
Gdk::Color round_robin_palette_color ();
Gdk::Color unique_random_color (std::list<Gdk::Color> &);
std::string rate_as_string (float r);

View File

@ -65,7 +65,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, std::shared_ptr<VCA> v)
if (!_vca->presentation_info().color_set()) {
if (UIConfiguration::instance().get_use_palette_for_new_vca ()) {
_vca->presentation_info().set_color (Gtkmm2ext::gdk_color_to_rgba (unique_random_color()));
_vca->presentation_info().set_color (Gtkmm2ext::gdk_color_to_rgba (AxisView::round_robin_palette_color ()));
} else {
_vca->presentation_info().set_color (UIConfiguration::instance ().color (X_("neutral:midground")));
}