From 6ae332d543be0c3d69cfbb214acf771b796434e1 Mon Sep 17 00:00:00 2001 From: Perry Fraser Date: Fri, 1 Aug 2025 07:10:26 -0400 Subject: [PATCH] fix: use the actual top anchor in SetMarginsPreset (#6118) --- RELEASE-NOTES.md | 2 +- Robust.Client/UserInterface/Controls/LayoutContainer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 17b90b53e..61a15456e 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -43,7 +43,7 @@ END TEMPLATE--> ### Bugfixes -*None yet* +* `LayoutContainer.SetMarginsPreset` and `SetAnchorAndMarginPreset` now correctly use the provided control's top anchor when calculating the margins for its presets; it previously used the bottom anchor instead. This may result in a few UI differences, by a few pixels at most. ### Other diff --git a/Robust.Client/UserInterface/Controls/LayoutContainer.cs b/Robust.Client/UserInterface/Controls/LayoutContainer.cs index 030806c29..f161c3b6c 100644 --- a/Robust.Client/UserInterface/Controls/LayoutContainer.cs +++ b/Robust.Client/UserInterface/Controls/LayoutContainer.cs @@ -326,7 +326,7 @@ namespace Robust.Client.UserInterface.Controls var parentSize = control.Parent?.Size ?? Vector2.Zero; var anchorLeft = control.GetValue(AnchorLeftProperty); - var anchorTop = control.GetValue(AnchorBottomProperty); + var anchorTop = control.GetValue(AnchorTopProperty); var anchorRight = control.GetValue(AnchorRightProperty); var anchorBottom = control.GetValue(AnchorBottomProperty);