Browse Source

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

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
71a4692f2d
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      Region.C
  2. +1
    -1
      main.C

+ 1
- 1
Region.C View File

@@ -260,7 +260,7 @@ Region::draw_box( int X, int Y, int W, int H )
fl_push_clip( x(), Y, w(), H ); fl_push_clip( x(), Y, w(), H );


if ( _selected ) 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 else
fl_draw_box( box(), x() - 10, Y, w() + 50, H, _box_color ); fl_draw_box( box(), x() - 10, Y, w() + 50, H, _box_color );




+ 1
- 1
main.C View File

@@ -72,7 +72,7 @@ cb_zoom ( Fl_Widget *w, void *v )
void void
cb_scroll ( Fl_Widget *w, void *v ) 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.tracks->redraw();
timeline.scroll->redraw(); timeline.scroll->redraw();




Loading…
Cancel
Save