mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
Patch from colinf to make stereo panners move right with the mouse (#4702).
git-svn-id: svn://localhost/ardour2/branches/3.0@11753 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d9d0c6b0b3
commit
231eefc247
1 changed files with 4 additions and 3 deletions
|
|
@ -469,8 +469,8 @@ StereoPanner::on_motion_notify_event (GdkEventMotion* ev)
|
|||
return false;
|
||||
}
|
||||
|
||||
int w = get_width();
|
||||
double delta = (ev->x - last_drag_x) / (double) w;
|
||||
int usable_width = get_width() - lr_box_size;
|
||||
double delta = (ev->x - last_drag_x) / (double) usable_width;
|
||||
double current_width = width_control->get_value ();
|
||||
|
||||
if (dragging_left) {
|
||||
|
|
@ -503,7 +503,8 @@ StereoPanner::on_motion_notify_event (GdkEventMotion* ev)
|
|||
}
|
||||
|
||||
} else {
|
||||
width_control->set_value (current_width + delta);
|
||||
/* width needs to change by 2 * delta because both L & R move */
|
||||
width_control->set_value (current_width + delta * 2);
|
||||
}
|
||||
|
||||
} else if (dragging_position) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue