Sequencer: Tweak appearance to look better with different color schemes.

This commit is contained in:
Jonathan Moore Liles 2020-09-26 09:59:17 -07:00
parent a2089421b1
commit 19b7927f08
1 changed files with 24 additions and 12 deletions

View File

@ -167,7 +167,8 @@ Canvas::Canvas ( int X, int Y, int W, int H, const char *L ) : Fl_Group( X,Y,W,H
o->canvas = this; o->canvas = this;
o->box( FL_FLAT_BOX ); o->box( FL_FLAT_BOX );
// o->color(fl_color_average( FL_BLACK, FL_WHITE, 0.90 )); // o->color(fl_color_average( FL_BLACK, FL_WHITE, 0.90 ));
o->color( FL_BLACK ); /* o->color( FL_BLACK ); */
o->color(fl_darker(FL_BACKGROUND_COLOR));
// o->color(FL_BACKGROUND_COLOR); // o->color(FL_BACKGROUND_COLOR);
// o->type( FL_HORIZONTAL ); // o->type( FL_HORIZONTAL );
o->callback( cb_scroll, this ); o->callback( cb_scroll, this );
@ -488,10 +489,12 @@ gui_draw_string ( int x, int y, int w, int h, int color, const char *s, bool dra
{ {
// fl_rectf( x,y,w,h, FL_BACKGROUND_COLOR ); // fl_rectf( x,y,w,h, FL_BACKGROUND_COLOR );
if ( color ) fl_color( FL_FOREGROUND_COLOR );
fl_color( velocity_colors[ color ] );
else /* if ( color ) */
fl_color( FL_DARK_CYAN ); /* fl_color( velocity_colors[ color ] ); */
/* else */
/* fl_color( FL_DARK_CYAN ); */
fl_draw( s, x, y + h / 2 + fl_descent() ); fl_draw( s, x, y + h / 2 + fl_descent() );
} }
@ -519,8 +522,8 @@ Canvas::draw_row_name ( int y, const char *name, int color )
if ( draw && name ) if ( draw && name )
{ {
fl_rectf( bx, by, bw, bh, index(name, '#') ? FL_GRAY : FL_BLACK ); fl_rectf( bx, by, bw, bh, index(name, '#') ? FL_GRAY : FL_BACKGROUND_COLOR );
fl_rect( bx, by, bw, bh, FL_BLACK ); fl_rect( bx, by, bw, bh, FL_BACKGROUND_COLOR );
} }
m.margin_left = max( m.margin_left, gui_draw_string( bx + 1, by + 2, m.margin_left = max( m.margin_left, gui_draw_string( bx + 1, by + 2,
@ -617,13 +620,22 @@ Canvas::draw_dash ( tick_t x, int y, tick_t w, int color, int selected ) const
if ( w > 4 ) if ( w > 4 )
{ {
fl_draw_box( FL_ROUNDED_BOX, x, y + 1, w, m.div_h - 1, color ); /* cairo_set_operator( Fl::cairo_cc(), CAIRO_OPERATOR_HSL_COLOR ); */
/* cairo_set_operator( Fl::cairo_cc(), CAIRO_OPERATOR_OVER ); */
fl_rectf( x, y + 1, w, m.div_h - 1, fl_color_add_alpha( color, 200 ) );
fl_rect(x, y + 1, w, m.div_h - 1, color );
/* fl_draw_box( FL_BORDER_BOX, x, y + 1, w, m.div_h - 1, color ); */
if ( selected ) if ( selected )
{ {
cairo_set_operator( Fl::cairo_cc(),CAIRO_OPERATOR_HSL_COLOR ); cairo_set_operator( Fl::cairo_cc(),CAIRO_OPERATOR_HSL_COLOR );
fl_draw_box( FL_ROUNDED_BOX, x, y + 1, w, m.div_h - 1, FL_MAGENTA ); fl_rectf( x, y + 1, w, m.div_h - 1, FL_MAGENTA );
cairo_set_operator( Fl::cairo_cc(),CAIRO_OPERATOR_OVER); cairo_set_operator( Fl::cairo_cc(),CAIRO_OPERATOR_OVER);
} }
@ -767,7 +779,7 @@ Canvas::draw_clip ( int X, int Y, int W, int H )
w() - m.margin_left, w() - m.margin_left,
h() - m.margin_top - panzoomer->h() ); h() - m.margin_top - panzoomer->h() );
fl_rectf( m.origin_x + m.margin_left, m.origin_y + m.margin_top, w(), h(), FL_BLACK ); fl_rectf( m.origin_x + m.margin_left, m.origin_y + m.margin_top, w(), h(), this->color() );
/* draw bar/beat lines */ /* draw bar/beat lines */