summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_hscroller.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-04-19 02:11:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-04-19 02:11:39 +0000
commit74e6e37d3038cfe45b856d92576b66aca519f43f (patch)
tree71763925dfb3f1ff26516f489a028b83655096e9 /gtk2_ardour/editor_hscroller.cc
parent099c4c8d064dce9f0517ae3e32d694a19d580d71 (diff)
a) fix editor hscroller to follow PT behaviour - scrollbar always
covers 0...full session + 10% of current zoom page size b) add "big meter" mode to tranzport and fix more bugs with tranzport support git-svn-id: svn://localhost/trunk/ardour2@455 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_hscroller.cc')
-rw-r--r--gtk2_ardour/editor_hscroller.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_hscroller.cc b/gtk2_ardour/editor_hscroller.cc
index 049f19b85f..5b2da7dc83 100644
--- a/gtk2_ardour/editor_hscroller.cc
+++ b/gtk2_ardour/editor_hscroller.cc
@@ -28,10 +28,6 @@ using namespace ARDOUR;
void
Editor::hscrollbar_allocate (Gtk::Allocation &alloc)
{
- if (session) {
- horizontal_adjustment.set_upper (session->current_end_frame() / frames_per_unit);
- }
-
}
bool
@@ -55,3 +51,9 @@ Editor::hscrollbar_button_release (GdkEventButton *ev)
return true;
}
+void
+Editor::reset_hscrollbar_stepping ()
+{
+ horizontal_adjustment.set_step_increment ((current_page_frames() / 5)/frames_per_unit); /* 5 clicks to scroll the entire page */
+ horizontal_adjustment.set_page_increment (current_page_frames()/frames_per_unit);
+}