mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 542957: Scroll terminal number of lines indicated in wheel scroll event
The original code used the direction provided by the scroll wheel, but not the magnitude. Change-Id: I7f5e2083599990f4f4999aba46ef38602b9fe565
This commit is contained in:
parent
cef0a80f91
commit
f294b6583b
1 changed files with 1 additions and 3 deletions
|
@ -32,9 +32,7 @@ abstract public class GridCanvas extends VirtualCanvas {
|
||||||
super(parent, style);
|
super(parent, style);
|
||||||
addListener(SWT.MouseWheel, event -> {
|
addListener(SWT.MouseWheel, event -> {
|
||||||
if (getVerticalBar().isVisible()) {
|
if (getVerticalBar().isVisible()) {
|
||||||
int delta = -fCellHeight;
|
int delta = -fCellHeight * event.count;
|
||||||
if (event.count < 0)
|
|
||||||
delta = -delta;
|
|
||||||
scrollYDelta(delta);
|
scrollYDelta(delta);
|
||||||
}
|
}
|
||||||
event.doit = false;
|
event.doit = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue