Skip to content

Commit 57be47d

Browse files
committed
Fix width and height of row/column components
1 parent 6b62d09 commit 57be47d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common/src/main/java/io/github/notenoughupdates/moulconfig/gui/component/ColumnComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public <T> T foldChildren(T initial, BiFunction<GuiComponent, T, T> visitor) {
6565
}
6666

6767
public void foldWithContext(GuiImmediateContext context, BiConsumer<GuiComponent, GuiImmediateContext> visitor) {
68-
int width = getWidth();
68+
int width = context.getWidth();
6969
foldChildren(0, (child, position) -> {
7070
visitor.accept(child, context.translated(0, position, width, child.getHeight()));
7171
return child.getHeight() + position;

common/src/main/java/io/github/notenoughupdates/moulconfig/gui/component/RowComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public <T> T foldChildren(T initial, BiFunction<GuiComponent, T, T> visitor) {
6565
}
6666

6767
public void foldWithContext(GuiImmediateContext context, BiConsumer<GuiComponent, GuiImmediateContext> visitor) {
68-
int height = getHeight();
68+
int height = context.getHeight();
6969
foldChildren(0, (child, position) -> {
7070
visitor.accept(child, context.translated(position, 0, child.getWidth(), height));
7171
return child.getWidth() + position;

0 commit comments

Comments
 (0)