Skip to content

Commit

Permalink
Merge pull request #278 from kikugie/overlay-rescaling-fix
Browse files Browse the repository at this point in the history
Fix `OverlayContainer` child mounting
  • Loading branch information
gliscowo authored Jul 28, 2024
2 parents ee41df9 + 9f0798f commit 447f780
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ public boolean canFocus(FocusSource source) {

@Override
protected int childMountX() {
return this.padding.get().left() + (this.width - this.child.fullSize().width()) / 2;
return this.x + this.padding.get().left() + (this.width - this.child.fullSize().width()) / 2;
}

@Override
protected int childMountY() {
return this.padding.get().top() + (this.height() - this.child.fullSize().height()) / 2;
return this.y + this.padding.get().top() + (this.height() - this.child.fullSize().height()) / 2;
}

/**
Expand Down

0 comments on commit 447f780

Please sign in to comment.