From 6bcadabe8d5dc5aba471afd99bc195b5b1d3d215 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 27 Apr 2008 14:37:52 -0500 Subject: [PATCH] Clean up logic in control sequence display options. --- Timeline/Control_Sequence.C | 14 +++++++++----- Timeline/Loggable.C | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Timeline/Control_Sequence.C b/Timeline/Control_Sequence.C index 89e93a4..6061a54 100644 --- a/Timeline/Control_Sequence.C +++ b/Timeline/Control_Sequence.C @@ -159,16 +159,18 @@ Control_Sequence::draw ( void ) fl_clip_box( bx, by, bw, bh, X, Y, W, H ); - const Fl_Color color = active_r() ? this->color() : fl_inactive( this->color() ); - const Fl_Color selection_color = active_r() ? this->selection_color() : fl_inactive( this->selection_color() ); + bool active = active_r(); + const Fl_Color color = active ? this->color() : fl_inactive( this->color() ); + const Fl_Color selection_color = active ? this->selection_color() : fl_inactive( this->selection_color() ); if ( draw_with_gradient ) { -// Fl_Color target = fl_color_average( color, FL_WHITE, 0.50f ); +/* const Fl_Color c2 = fl_color_average( selection_color, FL_WHITE, 0.90f ); */ +/* const Fl_Color c1 = fl_color_average( color, c2, 0.60f ); */ - const Fl_Color c2 = fl_color_average( selection_color, FL_WHITE, 0.75f ); - const Fl_Color c1 = fl_color_average( color, c2, 0.60f ); + const Fl_Color c1 = fl_color_average( selection_color, FL_WHITE, 0.90f ); + const Fl_Color c2 = fl_color_average( color, c1, 0.60f ); for ( int gy = 0; gy < bh; gy++ ) { @@ -191,6 +193,8 @@ Control_Sequence::draw ( void ) if ( draw_with_polygon ) { + fl_color( draw_with_gradient ? color : fl_color_average( color, selection_color, 0.45f ) ); + fl_begin_complex_polygon(); draw_curve( draw_with_gradient, true ); fl_end_complex_polygon(); diff --git a/Timeline/Loggable.C b/Timeline/Loggable.C index 5fc7e0c..4645d38 100644 --- a/Timeline/Loggable.C +++ b/Timeline/Loggable.C @@ -203,7 +203,7 @@ Loggable::do_this ( const char *s, bool reverse ) } else if ( ! strcmp( command, "set" ) ) { - printf( "got set command (%s).\n", arguments ); +// printf( "got set command (%s).\n", arguments ); char **sa = parse_alist( arguments );