- wheelRotation += rotation;
- lines = wheelRotation / delta;
- wheelRotation -= lines * delta;
- if (lines != 0) {
- lines *= linesPerAction;
- topLineNew -= lines;
- ScrollTo(topLineNew);
+ if (ctrlDown) { // Zoom the fonts if Ctrl key down
+ if (rotation < 0) {
+ KeyCommand(SCI_ZOOMIN);
+ }
+ else {
+ KeyCommand(SCI_ZOOMOUT);
+ }
+ }
+ else { // otherwise just scroll the window
+ wheelRotation += rotation;
+ lines = wheelRotation / delta;
+ wheelRotation -= lines * delta;
+ if (lines != 0) {
+ lines *= linesPerAction;
+ topLineNew -= lines;
+ ScrollTo(topLineNew);
+ }