aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-20 20:53:59 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-20 20:53:59 +0300
commitb234590bab2866cda0ce3b48aba0206e3c4ce198 (patch)
tree4877996fecd46188e3eb5d235bb1081c717fc2e7
parent04c47ecad68280765c7f2f8ca4833f199c6bd166 (diff)
downloadLibGui-b234590bab2866cda0ce3b48aba0206e3c4ce198.tar.gz
LibGui-b234590bab2866cda0ce3b48aba0206e3c4ce198.tar.bz2
LibGui-b234590bab2866cda0ce3b48aba0206e3c4ce198.zip
Set the max value of scroll bars be at least the window
-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() {