BView: scroll horizontally when holding control

... instead of vertically. This actually swaps horizontal and vertical
so if you have a mouse with a fancy 2-axis scroll ball it will swap
the x and y coordinates. (untested)
This commit is contained in:
John Scipione
2014-03-07 19:11:46 -05:00
parent ab5c74422e
commit a6213356bc
+4
View File
@@ -12,6 +12,7 @@
#include <View.h>
#include <algorithm>
#include <new>
#include <math.h>
@@ -4417,6 +4418,9 @@ BView::MessageReceived(BMessage* message)
if (deltaX == 0.0f && deltaY == 0.0f)
break;
if ((modifiers() & B_CONTROL_KEY) != 0)
std::swap(horizontal, vertical);
if (horizontal != NULL && deltaX != 0.0f)
ScrollWithMouseWheelDelta(horizontal, deltaX);