mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
Fix alt + mousewheel vertical being changed to horizontal for qwidgets
This commit is contained in:
parent
82e0e7136a
commit
bac0b4bb2d
@ -1016,14 +1016,23 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
}
|
}
|
||||||
if (wheelEvent->angleDelta().x() > 5) {
|
if (wheelEvent->angleDelta().x() > 5) {
|
||||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||||
SetMapping("mousewheelright");
|
// QT changes scrolling to horizontal for all widgets with the alt modifier
|
||||||
|
if (Qt::AltModifier & QApplication::keyboardModifiers()) {
|
||||||
|
SetMapping("mousewheelup");
|
||||||
|
} else {
|
||||||
|
SetMapping("mousewheelright");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, "Cannot set mapping",
|
QMessageBox::information(this, "Cannot set mapping",
|
||||||
"Mousewheel cannot be mapped to stick outputs");
|
"Mousewheel cannot be mapped to stick outputs");
|
||||||
}
|
}
|
||||||
} else if (wheelEvent->angleDelta().x() < -5) {
|
} else if (wheelEvent->angleDelta().x() < -5) {
|
||||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||||
SetMapping("mousewheelleft");
|
if (Qt::AltModifier & QApplication::keyboardModifiers()) {
|
||||||
|
SetMapping("mousewheeldown");
|
||||||
|
} else {
|
||||||
|
SetMapping("mousewheelleft");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, "Cannot set mapping",
|
QMessageBox::information(this, "Cannot set mapping",
|
||||||
"Mousewheel cannot be mapped to stick outputs");
|
"Mousewheel cannot be mapped to stick outputs");
|
||||||
|
Loading…
Reference in New Issue
Block a user