X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Faxis_view.cc;h=e69fdf0540fe48611585b3b6e661e2ff8797b1db;hb=0a24970b4eeb84a3313755266872b1981c708d95;hp=123f9b4b5733e3cfe50de378db123089886c3e49;hpb=e493b2b7c4fbbbfc457f02babf9546289b430177;p=ardour.git diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc index 123f9b4b57..e69fdf0540 100644 --- a/gtk2_ardour/axis_view.cc +++ b/gtk2_ardour/axis_view.cc @@ -43,11 +43,12 @@ using namespace Gtk; using namespace Gtkmm2ext; -list AxisView::used_colors; +list AxisView::used_colors; AxisView::AxisView (ARDOUR::Session& sess) : _session(sess) { _selected = false; + _marked_for_display = true; } AxisView::~AxisView() @@ -55,10 +56,10 @@ AxisView::~AxisView() } -GdkColor +Gdk::Color AxisView::unique_random_color() { - GdkColor newcolor; + Gdk::Color newcolor; while (1) { @@ -68,22 +69,22 @@ AxisView::unique_random_color() const int32_t max_saturation = 48000; // 65535 would open up the whole color wheel - newcolor.red = random() % max_saturation; - newcolor.blue = random() % max_saturation; - newcolor.green = random() % max_saturation; + newcolor.set_red (random() % max_saturation); + newcolor.set_blue (random() % max_saturation); + newcolor.set_green (random() % max_saturation); if (used_colors.size() == 0) { used_colors.push_back (newcolor); return newcolor; } - for (list::iterator i = used_colors.begin(); i != used_colors.end(); ++i) { - GdkColor c = *i; + for (list::iterator i = used_colors.begin(); i != used_colors.end(); ++i) { + Gdk::Color c = *i; float rdelta, bdelta, gdelta; - rdelta = newcolor.red - c.red; - bdelta = newcolor.blue - c.blue; - gdelta = newcolor.green - c.green; + rdelta = newcolor.get_red() - c.get_red(); + bdelta = newcolor.get_blue() - c.get_blue(); + gdelta = newcolor.get_green() - c.get_green(); if (sqrt (rdelta*rdelta + bdelta*bdelta + gdelta*gdelta) > 25.0) { used_colors.push_back (newcolor);