diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-20 20:53:59 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-20 20:53:59 +0300 |
commit | b234590bab2866cda0ce3b48aba0206e3c4ce198 (patch) | |
tree | 4877996fecd46188e3eb5d235bb1081c717fc2e7 | |
parent | 04c47ecad68280765c7f2f8ca4833f199c6bd166 (diff) | |
download | LibGui-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.java | 2 |
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() { |