mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 14:15:46 +01:00
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
This commit is contained in:
parent
7e551db0d7
commit
612f25ab3a
2 changed files with 12 additions and 3 deletions
|
|
@ -226,6 +226,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
|
|||
editor.ZoomChanged.connect (mem_fun(*this, &RouteTimeAxisView::reset_samples_per_unit));
|
||||
ColorsChanged.connect (mem_fun (*this, &RouteTimeAxisView::color_handler));
|
||||
|
||||
gm.get_gain_slider().signal_scroll_event().connect(mem_fun(*this, &RouteTimeAxisView::controls_ebox_scroll), false);
|
||||
gm.get_gain_slider().set_name ("TrackGainFader");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue