diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-05-23 12:18:33 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-05-23 12:19:20 +0300 |
commit | 4a7b1cc6ab24d014320ebc7b8f0f21d82357e043 (patch) | |
tree | c3e63018af676125bbbe5832769ea2d4ea1469d4 | |
parent | 05a505dd5cd216fc4538124fa671314f7d72eb70 (diff) | |
download | LibGui-4a7b1cc6ab24d014320ebc7b8f0f21d82357e043.tar.gz LibGui-4a7b1cc6ab24d014320ebc7b8f0f21d82357e043.tar.bz2 LibGui-4a7b1cc6ab24d014320ebc7b8f0f21d82357e043.zip |
Fix WBox always resizing children and calling wrong canResize
Fixes #162.
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java index 637ee56..5452b93 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java @@ -58,7 +58,7 @@ public class WBox extends WPanelWithInsets { public void add(WWidget widget, int width, int height) { widget.setParent(this); children.add(widget); - if (canResize()) { + if (widget.canResize()) { widget.setSize(width, height); } } |