summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-12 17:21:41 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-12 17:21:41 -0400
commit684d45c0ccd12cbb0f18336486a8982eeb8029cf (patch)
treee0a9c33e6fb850c5ded58c5bed22e3791a7b4807 /gtk2_ardour
parent720a9b73a592535e997bf4125347f2444a65bc5d (diff)
restored track height adjustment using alt-scroll on track headers
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/time_axis_view.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 059776bd92..a05b144e56 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -287,6 +287,36 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
bool
TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
{
+ switch (ev->direction) {
+ case GDK_SCROLL_UP:
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
+ /* See Editor::_stepping_axis_view for notes on this hack */
+ Editor& e = dynamic_cast<Editor&> (_editor);
+ if (!e.stepping_axis_view ()) {
+ e.set_stepping_axis_view (this);
+ }
+ e.stepping_axis_view()->step_height (false);
+ return true;
+ }
+ break;
+
+ case GDK_SCROLL_DOWN:
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
+ /* See Editor::_stepping_axis_view for notes on this hack */
+ Editor& e = dynamic_cast<Editor&> (_editor);
+ if (!e.stepping_axis_view ()) {
+ e.set_stepping_axis_view (this);
+ }
+ e.stepping_axis_view()->step_height (true);
+ return true;
+ }
+ break;
+
+ default:
+ /* no handling for left/right, yet */
+ break;
+ }
+
/* Just forward to the normal canvas scroll method. The coordinate
systems are different but since the canvas is always larger than the
track headers, and aligned with the trackview area, this will work.