Scroll bar moves by pixels, not samples. This eliminates rounding errors while scrolling.

This commit is contained in:
Jonathan Moore Liles 2008-02-21 02:46:31 -06:00
parent 9b1e8259be
commit 71a4692f2d
2 changed files with 2 additions and 2 deletions

View File

@ -260,7 +260,7 @@ Region::draw_box( int X, int Y, int W, int H )
fl_push_clip( x(), Y, w(), H );
if ( _selected )
fl_draw_box( FL_DOWN_BOX, x() - 10, Y, w() + 50, H, _selection_color );
fl_draw_box( fl_down( box() ), x() - 10, Y, w() + 50, H, _selection_color );
else
fl_draw_box( box(), x() - 10, Y, w() + 50, H, _box_color );

2
main.C
View File

@ -72,7 +72,7 @@ cb_zoom ( Fl_Widget *w, void *v )
void
cb_scroll ( Fl_Widget *w, void *v )
{
timeline.xoffset = ((Fl_Slider*)w)->value();
timeline.xoffset = timeline.x_to_ts( ((Fl_Slider*)w)->value() );
// timeline.tracks->redraw();
timeline.scroll->redraw();