aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2022-05-23 12:18:33 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2022-05-23 12:19:20 +0300
commit4a7b1cc6ab24d014320ebc7b8f0f21d82357e043 (patch)
treec3e63018af676125bbbe5832769ea2d4ea1469d4
parent05a505dd5cd216fc4538124fa671314f7d72eb70 (diff)
downloadLibGui-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.java2
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);
}
}