View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002208 | ardour | features | public | 2008-04-21 17:39 | 2012-01-10 17:59 |
| Reporter | colinf | Assigned To | paul | ||
| Priority | normal | Severity | trivial | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | SVN/2.0-ongoing | ||||
| Summary | 0002208: Make gain sliders in track view insesitive to scroll wheel events | ||||
| Description | I use the scroll wheel a lot to scroll up & down in the track view, but I've found it's really easy to accidentally point at the gain sliders and adjust them without intending to. Since there's no way to undo a gain change, this is a bit annoying. | ||||
| Additional Information | Here's a hack of a patch that just sets the page_size of the gain_adjustment control in track view to 0, which does the trick for me. You can still click & drag the slider, but scroll-wheeling over it has no effect. It's not really the right solution, since the gain_adjustment still grabs the scroll events, so once you've scrolled so that a slider is under the mouse pointer you can't scroll any more (until you move the mouse away from the slider), but I couldn't work out a way to make the control not receive scroll events at all. I'm sure it's easy when you know how... | ||||
| Tags | No tags attached. | ||||
|
2008-04-21 17:39
|
make-track-gains-insensitive.patch (458 bytes)
Index: gtk2_ardour/route_time_axis.cc
===================================================================
--- gtk2_ardour/route_time_axis.cc (revision 3278)
+++ gtk2_ardour/route_time_axis.cc (working copy)
@@ -106,7 +106,7 @@
visual_button (_("v")),
lm (rt, sess),
gain_slider (0),
- gain_adjustment (0.781787, 0.0, 1.0, 0.01, 0.1),
+ gain_adjustment (0.781787, 0.0, 1.0, 0.01, 0),
ignore_gain_adjustment (false)
{
if (slider == 0) {
|
|
2008-05-27 15:47
|
make-track-gains-scroll.patch (1,966 bytes)
Index: gtk2_ardour/route_time_axis.cc
===================================================================
--- gtk2_ardour/route_time_axis.cc (revision 3416)
+++ gtk2_ardour/route_time_axis.cc (working copy)
@@ -235,9 +235,10 @@
gain_slider->signal_button_press_event().connect (mem_fun(*this, &RouteTimeAxisView::start_gain_touch));
gain_slider->signal_button_release_event().connect (mem_fun(*this, &RouteTimeAxisView::end_gain_touch));
+ gain_slider->signal_scroll_event().connect(mem_fun(*this, &RouteTimeAxisView::controls_ebox_scroll), false);
gain_slider->set_name ("TrackGainFader");
gain_adjustment.signal_value_changed().connect (mem_fun(*this, &RouteTimeAxisView::gain_adjusted));
_route->gain_changed.connect (mem_fun(*this, &RouteTimeAxisView::gain_changed));
gain_slider->show_all();
Index: gtk2_ardour/time_axis_view.cc
===================================================================
--- gtk2_ardour/time_axis_view.cc (revision 3416)
+++ gtk2_ardour/time_axis_view.cc (working copy)
@@ -272,6 +272,9 @@
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 @@
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 @@
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);
}
|
|
|
And here's a patch (make-track-gains-scroll.patch) doing this in a (hopefully) better way. It connects the signal_scroll_event() of the slider to the (already existing) function controls_ebox_scroll(), which was already connected to handle scroll-wheel events on the track name boxes. It also makes controls_ebox_scroll() handle both the no-modifier case and the tertiary (shift) case, so that both scroll-wheeling & shift-scrollwheeling work the same when the pointer is over either the track name, track gain control, or neither. Incidentally, it increases the increment of track height when shift-scrollwheeling from 4 to 20; this feels more usable to me. |
|
2008-06-18 09:10
|
make-track-gains-scroll-3470.patch (1,724 bytes)
Index: gtk2_ardour/route_time_axis.cc
===================================================================
--- gtk2_ardour/route_time_axis.cc (revision 3470)
+++ gtk2_ardour/route_time_axis.cc (working copy)
@@ -226,6 +226,7 @@
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");
}
Index: gtk2_ardour/time_axis_view.cc
===================================================================
--- gtk2_ardour/time_axis_view.cc (revision 3470)
+++ gtk2_ardour/time_axis_view.cc (working copy)
@@ -272,6 +272,9 @@
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 @@
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 @@
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);
}
|
|
|
Here's a new version of the patch to fix the conflict with svn 3470 |
|
|
Incidentally, you can still adjust the track view faders with the scroll wheel with this patch applied: use <Alt>+scroll wheel. |
|
|
accepted, applied and committed. |
|
|
Closing my old issues: this is long since fixed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-04-21 17:39 | colinf | New Issue | |
| 2008-04-21 17:39 | colinf | File Added: make-track-gains-insensitive.patch | |
| 2008-05-27 15:47 | colinf | File Added: make-track-gains-scroll.patch | |
| 2008-05-27 15:55 | colinf | Note Added: 0004965 | |
| 2008-06-18 09:10 | colinf | File Added: make-track-gains-scroll-3470.patch | |
| 2008-06-18 09:10 | colinf | Note Added: 0005041 | |
| 2008-06-18 09:25 | colinf | Note Added: 0005042 | |
| 2008-06-18 16:22 | paul | cost | => 0.00 |
| 2008-06-18 16:22 | paul | Status | new => resolved |
| 2008-06-18 16:22 | paul | Resolution | open => fixed |
| 2008-06-18 16:22 | paul | Assigned To | => paul |
| 2008-06-18 16:22 | paul | Note Added: 0005046 | |
| 2012-01-10 17:59 | colinf | Note Added: 0012536 | |
| 2012-01-10 17:59 | colinf | Status | resolved => closed |
| 2013-01-07 14:42 | colinf | Relationship added | related to 0005258 |