Skip to content

Commit

Permalink
Rebuild the full UI when the window is resized. (#163)
Browse files Browse the repository at this point in the history
This is required to fix misplaced elements that are anchored at the
right of bottom sides of the window.
  • Loading branch information
veger authored Jun 18, 2024
1 parent 7c20689 commit 9fba647
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Yafc.UI/Core/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ internal int CalculateUnitsToPixels(int display) {
return desiredUnitsToPixels;
}

internal virtual void WindowResize() => rootGui.Rebuild();
internal virtual void WindowResize() {
rootGui.MarkEverythingForRebuild();
rootGui.Rebuild();
}

internal void WindowMoved() {
if (surface is null) { throw new InvalidOperationException($"surface must be set by a derived class before calling {nameof(WindowMoved)}."); }
Expand Down

0 comments on commit 9fba647

Please sign in to comment.