Timeline: Tweak style of measure lines.

This commit is contained in:
Jonathan Moore Liles 2020-09-18 22:52:34 -07:00
parent 455cc0f3ad
commit 6bee859f6f
1 changed files with 16 additions and 4 deletions

View File

@ -997,20 +997,32 @@ Timeline::draw_measure_cb ( nframes_t frame, const BBT &bbt, void *v )
{ {
Timeline *o = (Timeline*)v; Timeline *o = (Timeline*)v;
Fl_Color c = FL_LIGHT3;
if ( o->panzoomer->zoom() >= 15 ) if ( o->panzoomer->zoom() >= 15 )
return; return;
Fl_Color mc = FL_LIGHT3;
Fl_Color bc = FL_LIGHT2;
Fl_Color c;
Fl_Color ct = fl_contrast( mc, FL_BACKGROUND_COLOR );
if ( FL_BLACK == ct )
{
/* in a light color scheme mode */
mc = fl_rgb_color(30,30,30);
bc = FL_DARK3;
}
if ( bbt.beat ) if ( bbt.beat )
{ {
if ( o->panzoomer->zoom() > 12 ) if ( o->panzoomer->zoom() > 12 )
return; return;
else else
c = FL_DARK1; c = bc;
} }
else
c = mc;
fl_color( fl_color_add_alpha( c, 64 ) ); fl_color( fl_color_add_alpha( c, 127 ) );
const int x = timeline->ts_to_x( frame - timeline->xoffset ) + Track::width(); const int x = timeline->ts_to_x( frame - timeline->xoffset ) + Track::width();