Timeline: Suppress measure line drawing at wide zoom levels.
This commit is contained in:
parent
a985cb3168
commit
d455621543
|
@ -929,12 +929,20 @@ Timeline::x_to_offset ( int x ) const
|
|||
}
|
||||
|
||||
/** draws a single measure line */
|
||||
static void
|
||||
draw_measure_cb ( nframes_t frame, const BBT &bbt, void * )
|
||||
void
|
||||
Timeline::draw_measure_cb ( nframes_t frame, const BBT &bbt, void *v )
|
||||
{
|
||||
Timeline *o = (Timeline*)v;
|
||||
|
||||
Fl_Color c = FL_LIGHT3;
|
||||
|
||||
if ( o->panzoomer->zoom() >= 15 )
|
||||
return;
|
||||
|
||||
if ( bbt.beat )
|
||||
if ( o->panzoomer->zoom() > 12 )
|
||||
return;
|
||||
else
|
||||
c = FL_DARK1;
|
||||
|
||||
fl_color( fl_color_add_alpha( c, 64 ) );
|
||||
|
@ -1098,7 +1106,7 @@ Timeline::draw_measure_lines ( int X, int Y, int W, int H )
|
|||
|
||||
fl_push_clip( X, Y, W, H );
|
||||
|
||||
render_tempomap( start, length, draw_measure_cb, NULL );
|
||||
render_tempomap( start, length, draw_measure_cb, this );
|
||||
|
||||
fl_pop_clip();
|
||||
}
|
||||
|
|
|
@ -121,6 +121,8 @@ class Timeline : public Fl_Single_Window, public RWLock
|
|||
void menu_cb ( Fl_Menu_ *m );
|
||||
void fix_range ( void );
|
||||
|
||||
static void draw_measure_cb ( nframes_t frame, const BBT &bbt, void * );
|
||||
|
||||
int _fpp; /* frames per pixel, power of two */
|
||||
|
||||
// nframes_t p1, p2; /* cursors */
|
||||
|
|
Loading…
Reference in New Issue