13
0

remove unused label_color from TimeAxisViewItem

This commit is contained in:
Paul Davis 2014-06-05 12:04:34 -04:00
parent 39eec5ac1b
commit 94b0d3bc25
2 changed files with 2 additions and 79 deletions

View File

@ -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 */
/* 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;
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<double>(r*r + g*g + b+b))/3.0f));
minor_shift = 125 - radius;
/* LABEL: rotate around color wheel by 120 degrees anti-clockwise */
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;
}
/**

View File

@ -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;