Continue cleaning up scrolling issues.

pull/3/head
Jonathan Moore Liles 2008-04-27 13:44:20 -05:00
parent d3ac3b5d5a
commit 96051065db
4 changed files with 20 additions and 8 deletions

View File

@ -358,7 +358,7 @@ up_box ( int x, int y, int w, int h, Fl_Color c )
/* stipple */
fl_color( fl_color_average( FL_GRAY, c, 0.10f ) );
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 );
}

View File

@ -93,7 +93,7 @@ Sequence::draw ( void )
fl_push_clip( x(), y(), w(), h() );
/* 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;

View File

@ -224,7 +224,10 @@ Sequence_Widget::handle ( int m )
pos += d;
timeline->xposition( timeline->ts_to_x( pos ) );
_track->redraw();
/* FIXME: why isn't this enough? */
// _track->redraw();
timeline->redraw();
}
return 1;

View File

@ -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 )
return;
fl_push_clip( X, Y, W, H );
// fl_line_style( FL_DASH, 2 );
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;
/* 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 )
{
// 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_pop_clip();
}
void
@ -479,11 +489,10 @@ Timeline::draw ( void )
/* return; */
/* } */
if ( ( damage() & FL_DAMAGE_CHILD && damage() & FL_DAMAGE_SCROLL ) ||
( (damage() & FL_DAMAGE_ALL)
||
damage() & FL_DAMAGE_EXPOSE ) )
if ( damage() & FL_DAMAGE_ALL || damage() & FL_DAMAGE_EXPOSE )
{
printf( "complete redraw\n" );
draw_box( box(), 0, 0, w(), h(), color() );
fl_push_clip( 0, rulers->y(), w(), rulers->h() );
@ -738,7 +747,7 @@ Timeline::handle ( int m )
{
case FL_FOCUS:
case FL_UNFOCUS:
redraw();
// redraw();
return 1;
case FL_KEYBOARD:
case FL_SHORTCUT: