Browse Source

Continue cleaning up scrolling issues.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
96051065db
4 changed files with 20 additions and 8 deletions
  1. +1
    -1
      FL/Boxtypes.C
  2. +1
    -1
      Timeline/Sequence.C
  3. +4
    -1
      Timeline/Sequence_Widget.C
  4. +14
    -5
      Timeline/Timeline.C

+ 1
- 1
FL/Boxtypes.C 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 );
}


+ 1
- 1
Timeline/Sequence.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;



+ 4
- 1
Timeline/Sequence_Widget.C 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;


+ 14
- 5
Timeline/Timeline.C 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:


Loading…
Cancel
Save