Clarify round-robin color palette API name
This commit is contained in:
parent
9e35a9da66
commit
c228d05c47
|
@ -52,8 +52,6 @@ using namespace Gtkmm2ext;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace ARDOUR_UI_UTILS;
|
using namespace ARDOUR_UI_UTILS;
|
||||||
|
|
||||||
list<Gdk::Color> AxisView::used_colors;
|
|
||||||
|
|
||||||
AxisView::AxisView ()
|
AxisView::AxisView ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -63,9 +61,9 @@ AxisView::~AxisView()
|
||||||
}
|
}
|
||||||
|
|
||||||
Gdk::Color
|
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
|
string
|
||||||
|
|
|
@ -122,19 +122,12 @@ public:
|
||||||
static GUIObjectState& gui_object_state();
|
static GUIObjectState& gui_object_state();
|
||||||
void clear_property_cache() { property_hashtable.clear(); }
|
void clear_property_cache() { property_hashtable.clear(); }
|
||||||
|
|
||||||
/**
|
static Gdk::Color round_robin_palette_color ();
|
||||||
* Generate a new random TrackView color, unique from those colors already used.
|
|
||||||
*
|
|
||||||
* @return the unique random color.
|
|
||||||
*/
|
|
||||||
static Gdk::Color unique_random_color();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AxisView ();
|
AxisView ();
|
||||||
virtual ~AxisView();
|
virtual ~AxisView();
|
||||||
|
|
||||||
static std::list<Gdk::Color> used_colors;
|
|
||||||
|
|
||||||
Gtk::Label name_label;
|
Gtk::Label name_label;
|
||||||
void set_name_ellipsize_mode ();
|
void set_name_ellipsize_mode ();
|
||||||
|
|
||||||
|
|
|
@ -367,7 +367,7 @@ RouteUI::set_route (std::shared_ptr<Route> rp)
|
||||||
|
|
||||||
if (set_color_from_route()) {
|
if (set_color_from_route()) {
|
||||||
if (UIConfiguration::instance().get_use_palette_for_new_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 {
|
} else {
|
||||||
set_color (UIConfiguration::instance ().color (X_("neutral:midground")));
|
set_color (UIConfiguration::instance ().color (X_("neutral:midground")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -680,7 +680,7 @@ ARDOUR_UI_UTILS::escape_underscores (string const & s)
|
||||||
}
|
}
|
||||||
|
|
||||||
Gdk::Color
|
Gdk::Color
|
||||||
ARDOUR_UI_UTILS::unique_palette_color (list<Gdk::Color>& used_colors)
|
ARDOUR_UI_UTILS::round_robin_palette_color ()
|
||||||
{
|
{
|
||||||
Gdk::Color newcolor;
|
Gdk::Color newcolor;
|
||||||
string cp = UIConfiguration::instance().get_stripable_color_palette ();
|
string cp = UIConfiguration::instance().get_stripable_color_palette ();
|
||||||
|
|
|
@ -98,7 +98,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 unique_palette_color (std::list<Gdk::Color> &);
|
Gdk::Color round_robin_palette_color ();
|
||||||
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);
|
||||||
|
|
|
@ -65,7 +65,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, std::shared_ptr<VCA> v)
|
||||||
|
|
||||||
if (!_vca->presentation_info().color_set()) {
|
if (!_vca->presentation_info().color_set()) {
|
||||||
if (UIConfiguration::instance().get_use_palette_for_new_vca ()) {
|
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 {
|
} else {
|
||||||
_vca->presentation_info().set_color (UIConfiguration::instance ().color (X_("neutral:midground")));
|
_vca->presentation_info().set_color (UIConfiguration::instance ().color (X_("neutral:midground")));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue