diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-20 18:08:28 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-20 18:08:28 +0300 |
commit | 04c47ecad68280765c7f2f8ca4833f199c6bd166 (patch) | |
tree | cc44f36ea8e69bad1fbc76135d82a020d79729d5 /src/main/java/io | |
parent | ae87b1554ab83d4e294afc614aca910d59fe9de7 (diff) | |
download | LibGui-04c47ecad68280765c7f2f8ca4833f199c6bd166.tar.gz LibGui-04c47ecad68280765c7f2f8ca4833f199c6bd166.tar.bz2 LibGui-04c47ecad68280765c7f2f8ca4833f199c6bd166.zip |
Fix panels in scroll panels being the wrong size
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java index 9ff61a6..bff7987 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollPanel.java @@ -89,6 +89,7 @@ public class WScrollPanel extends WClippedPanel { horizontalScrollBar.setLocation(0, this.height - horizontalScrollBar.getHeight()); horizontalScrollBar.setSize(scrollingVertically ? (this.width - verticalScrollBar.getWidth()) : this.width, 8); + if (widget instanceof WPanel) ((WPanel) widget).layout(); children.add(widget); int x = scrollingHorizontally ? -horizontalScrollBar.getValue() : 0; int y = scrollingVertically ? -verticalScrollBar.getValue() : 0; |