summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index 0c2a54b4..c38a9427 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -316,14 +316,13 @@ public class PositioningComposite extends StateComposite {
return;
this.lastEventTime = e.getWhen();
+ int change = e.isShiftDown() ? 5 : 1;
int newPage = PositioningComposite.this.currentPage;
if (e.getWheelRotation() < 0) {
- if (PositioningComposite.this.currentPage > 1)
- newPage--;
+ newPage = Math.max(1, newPage - change);
} else if (e.getWheelRotation() > 0) {
- if (PositioningComposite.this.currentPage < PositioningComposite.this.numPages)
- newPage++;
+ newPage = Math.min(newPage + change, PositioningComposite.this.numPages);
}
if (newPage != PositioningComposite.this.currentPage)