summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-06-18 16:22:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-06-18 16:22:57 +0000
commit612f25ab3a9d397fd3cf057d96622cc328f32c79 (patch)
tree1aba8e669d50a74f39877cd8d45518661ee0f477 /gtk2_ardour/time_axis_view.cc
parent7e551db0d73769551ae86ef099fe7bf6ddc73943 (diff)
colinf's patch to make editor faders insensitive to scroll wheel events without Alt being down, and also change the step size for resizing (was bug #2208)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3475 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r--gtk2_ardour/time_axis_view.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 325fc6c217..8944fdc082 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -272,6 +272,9 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
step_height (true);
return true;
+ } else if (Keyboard::no_modifiers_active (ev->state)) {
+ editor.scroll_tracks_up_line();
+ return true;
}
break;
@@ -279,6 +282,9 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
step_height (false);
return true;
+ } else if (Keyboard::no_modifiers_active (ev->state)) {
+ editor.scroll_tracks_down_line();
+ return true;
}
break;
@@ -343,11 +349,13 @@ TimeAxisView::hide ()
void
TimeAxisView::step_height (bool bigger)
{
+static const int step = 20;
+
if (bigger) {
- set_height (height + 4);
+ set_height (height + step);
} else {
- if (height > 4) {
- set_height (std::max (height - 4, hSmall));
+ if (height > step) {
+ set_height (std::max (height - step, hSmall));
} else if (height != hSmall) {
set_height (hSmall);
}