aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java
index 2acfb80..e940327 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java
@@ -132,7 +132,7 @@ public class WScrollBar extends WAbstractSlider {
}
public void setMaxValue(int max) {
- super.setMaxValue(max - window);
+ super.setMaxValue(Math.max(max - window, window));
}
public int getWindow() {