Skip to content

Commit

Permalink
Fix width and height of row/column components
Browse files Browse the repository at this point in the history
  • Loading branch information
nea89o committed Nov 17, 2024
1 parent 6b62d09 commit 57be47d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public <T> T foldChildren(T initial, BiFunction<GuiComponent, T, T> visitor) {
}

public void foldWithContext(GuiImmediateContext context, BiConsumer<GuiComponent, GuiImmediateContext> visitor) {
int width = getWidth();
int width = context.getWidth();
foldChildren(0, (child, position) -> {
visitor.accept(child, context.translated(0, position, width, child.getHeight()));
return child.getHeight() + position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public <T> T foldChildren(T initial, BiFunction<GuiComponent, T, T> visitor) {
}

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

0 comments on commit 57be47d

Please sign in to comment.