From 71a4692f2df8971312012c5d4c490415c26d35e6 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 21 Feb 2008 02:46:31 -0600 Subject: [PATCH] Scroll bar moves by pixels, not samples. This eliminates rounding errors while scrolling. --- Region.C | 2 +- main.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Region.C b/Region.C index 5ff3427..532a06e 100644 --- a/Region.C +++ b/Region.C @@ -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 ); diff --git a/main.C b/main.C index f6a4d0b..6ef9348 100644 --- a/main.C +++ b/main.C @@ -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();