mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 05:32:14 +00:00
add Mac OS X horizontal scroll with mouse wheel (touch pad two fingers scrolling)
This commit is contained in:
parent
4ce178c419
commit
414bef0ce1
@ -1428,7 +1428,16 @@ public class FieldPanel extends JPanel
|
||||
}
|
||||
else {
|
||||
hoverHandler.stopHover();
|
||||
scrollView(scrollAmount);
|
||||
|
||||
if (e.isShiftDown()) {
|
||||
// horizontal scroll (only move viewport)
|
||||
if (viewport != null) {
|
||||
Point pos = viewport.getViewPosition();
|
||||
viewport.setViewPosition(new Point(Math.max(0, pos.x + scrollAmount), pos.y));
|
||||
}
|
||||
} else {
|
||||
scrollView(scrollAmount);
|
||||
}
|
||||
}
|
||||
e.consume();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user