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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user