Continue cleaning up scrolling issues.
This commit is contained in:
parent
d3ac3b5d5a
commit
96051065db
|
@ -358,7 +358,7 @@ up_box ( int x, int y, int w, int h, Fl_Color c )
|
||||||
/* stipple */
|
/* stipple */
|
||||||
fl_color( fl_color_average( FL_GRAY, c, 0.10f ) );
|
fl_color( fl_color_average( FL_GRAY, c, 0.10f ) );
|
||||||
for ( int i = y + 1; i < y + h - 8; i += 5 )
|
for ( int i = y + 1; i < y + h - 8; i += 5 )
|
||||||
fl_line( x, i, x + w, i );
|
fl_line( x + 1, i, x + w - 2, i );
|
||||||
|
|
||||||
frame_rect( x, y, w, h - 1, "IJLM", c );
|
frame_rect( x, y, w, h - 1, "IJLM", c );
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ Sequence::draw ( void )
|
||||||
fl_push_clip( x(), y(), w(), h() );
|
fl_push_clip( x(), y(), w(), h() );
|
||||||
|
|
||||||
/* draw the box with the ends cut off. */
|
/* draw the box with the ends cut off. */
|
||||||
draw_box( box(), x() - Fl::box_dx( box() ), y(), w() + Fl::box_dw( box() ) + 1, h(), color() );
|
draw_box( box(), x() - Fl::box_dx( box() ) - 1, y(), w() + Fl::box_dw( box() ) + 2, h(), color() );
|
||||||
|
|
||||||
int X, Y, W, H;
|
int X, Y, W, H;
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,10 @@ Sequence_Widget::handle ( int m )
|
||||||
pos += d;
|
pos += d;
|
||||||
|
|
||||||
timeline->xposition( timeline->ts_to_x( pos ) );
|
timeline->xposition( timeline->ts_to_x( pos ) );
|
||||||
_track->redraw();
|
|
||||||
|
/* FIXME: why isn't this enough? */
|
||||||
|
// _track->redraw();
|
||||||
|
timeline->redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -291,6 +291,8 @@ Timeline::draw_measure ( int X, int Y, int W, int H, Fl_Color color, bool BBT )
|
||||||
if ( ! draw_with_measure_lines )
|
if ( ! draw_with_measure_lines )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
fl_push_clip( X, Y, W, H );
|
||||||
|
|
||||||
// fl_line_style( FL_DASH, 2 );
|
// fl_line_style( FL_DASH, 2 );
|
||||||
fl_line_style( FL_DASH, 0 );
|
fl_line_style( FL_DASH, 0 );
|
||||||
|
|
||||||
|
@ -299,6 +301,13 @@ Timeline::draw_measure ( int X, int Y, int W, int H, Fl_Color color, bool BBT )
|
||||||
|
|
||||||
const nframes_t samples_per_minute = sample_rate() * 60;
|
const nframes_t samples_per_minute = sample_rate() * 60;
|
||||||
|
|
||||||
|
/* we need to back up a bit in order to catch all the numbers */
|
||||||
|
if ( BBT )
|
||||||
|
{
|
||||||
|
X -= 40;
|
||||||
|
W += 40;
|
||||||
|
}
|
||||||
|
|
||||||
for ( int x = X; x < X + W; ++x )
|
for ( int x = X; x < X + W; ++x )
|
||||||
{
|
{
|
||||||
// measure = ts_to_x( (double)(sample_rate() * 60) / beats_per_minute( x_to_ts( x - Track::width() ) + xoffset ) );
|
// measure = ts_to_x( (double)(sample_rate() * 60) / beats_per_minute( x_to_ts( x - Track::width() ) + xoffset ) );
|
||||||
|
@ -372,6 +381,7 @@ Timeline::draw_measure ( int X, int Y, int W, int H, Fl_Color color, bool BBT )
|
||||||
|
|
||||||
fl_line_style( FL_SOLID, 0 );
|
fl_line_style( FL_SOLID, 0 );
|
||||||
|
|
||||||
|
fl_pop_clip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -479,11 +489,10 @@ Timeline::draw ( void )
|
||||||
/* return; */
|
/* return; */
|
||||||
/* } */
|
/* } */
|
||||||
|
|
||||||
if ( ( damage() & FL_DAMAGE_CHILD && damage() & FL_DAMAGE_SCROLL ) ||
|
if ( damage() & FL_DAMAGE_ALL || damage() & FL_DAMAGE_EXPOSE )
|
||||||
( (damage() & FL_DAMAGE_ALL)
|
|
||||||
||
|
|
||||||
damage() & FL_DAMAGE_EXPOSE ) )
|
|
||||||
{
|
{
|
||||||
|
printf( "complete redraw\n" );
|
||||||
|
|
||||||
draw_box( box(), 0, 0, w(), h(), color() );
|
draw_box( box(), 0, 0, w(), h(), color() );
|
||||||
|
|
||||||
fl_push_clip( 0, rulers->y(), w(), rulers->h() );
|
fl_push_clip( 0, rulers->y(), w(), rulers->h() );
|
||||||
|
@ -738,7 +747,7 @@ Timeline::handle ( int m )
|
||||||
{
|
{
|
||||||
case FL_FOCUS:
|
case FL_FOCUS:
|
||||||
case FL_UNFOCUS:
|
case FL_UNFOCUS:
|
||||||
redraw();
|
// redraw();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_KEYBOARD:
|
case FL_KEYBOARD:
|
||||||
case FL_SHORTCUT:
|
case FL_SHORTCUT:
|
||||||
|
|
Loading…
Reference in New Issue