From 94b0d3bc259ac3799740b2bc29a7d62c2a03f0a9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 5 Jun 2014 12:04:34 -0400 Subject: [PATCH] remove unused label_color from TimeAxisViewItem --- gtk2_ardour/time_axis_view_item.cc | 80 +----------------------------- gtk2_ardour/time_axis_view_item.h | 1 - 2 files changed, 2 insertions(+), 79 deletions(-) diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 051f983ea7..ccf4eab096 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -674,90 +674,14 @@ TimeAxisViewItem::get_name_highlight() void TimeAxisViewItem::compute_colors (Gdk::Color const & base_color) { - unsigned char radius; - char minor_shift; - unsigned char r,g,b; - /* FILL: this is simple */ - r = base_color.get_red()/256; - g = base_color.get_green()/256; - b = base_color.get_blue()/256; - fill_color = RGBA_TO_UINT(r,g,b,160); - - /* for minor colors: - if the overall saturation is strong, make the minor colors light. - if its weak, make them dark. - - we do this by moving an equal distance to the other side of the - central circle in the color wheel from where we started. - */ - - radius = (unsigned char) rint (floor (sqrt (static_cast(r*r + g*g + b+b))/3.0f)); - minor_shift = 125 - radius; - - /* LABEL: rotate around color wheel by 120 degrees anti-clockwise */ + /* FILL: change opacity to a fixed value */ r = base_color.get_red()/256; g = base_color.get_green()/256; b = base_color.get_blue()/256; - - if (r > b) - { - if (r > g) - { - /* red sector => green */ - swap (r,g); - } - else - { - /* green sector => blue */ - swap (g,b); - } - } - else - { - if (b > g) - { - /* blue sector => red */ - swap (b,r); - } - else - { - /* green sector => blue */ - swap (g,b); - } - } - - r += minor_shift; - b += minor_shift; - g += minor_shift; - - label_color = RGBA_TO_UINT(r,g,b,255); - r = (base_color.get_red()/256) + 127; - g = (base_color.get_green()/256) + 127; - b = (base_color.get_blue()/256) + 127; - - label_color = RGBA_TO_UINT(r,g,b,255); - - /* XXX can we do better than this ? */ - /* We're trying;) */ - /* NUKECOLORS */ - - //frame_color_r = 192; - //frame_color_g = 192; - //frame_color_b = 194; - - //selected_frame_color_r = 182; - //selected_frame_color_g = 145; - //selected_frame_color_b = 168; - - //handle_color_r = 25; - //handle_color_g = 0; - //handle_color_b = 255; - //lock_handle_color_r = 235; - //lock_handle_color_g = 16; - //lock_handle_color_b = 16; + fill_color = RGBA_TO_UINT(r,g,b,160); } /** diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index 87101aad3b..6fb1926fb3 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -238,7 +238,6 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList uint32_t selected_frame_color_r; uint32_t selected_frame_color_g; uint32_t selected_frame_color_b; - uint32_t label_color; uint32_t handle_color_r; uint32_t handle_color_g; -- 2.30.2