aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
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:18:33 +0300
commit8b44fc8a5a178c16641cecdbb5a6fd0f8e434fcd (patch)
treea09d02701c98593051b9a8aab4ede494b81ba096 /src/main/java/io
parent223c3d585ce3ed1338be5b048d8ee4c60281cd94 (diff)
downloadLibGui-8b44fc8a5a178c16641cecdbb5a6fd0f8e434fcd.tar.gz
LibGui-8b44fc8a5a178c16641cecdbb5a6fd0f8e434fcd.tar.bz2
LibGui-8b44fc8a5a178c16641cecdbb5a6fd0f8e434fcd.zip
Fix WBox always resizing children and calling wrong canResize
Fixes #162.
Diffstat (limited to 'src/main/java/io')
-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);
}
}