fix: use the actual top anchor in SetMarginsPreset (#6118)

This commit is contained in:
Perry Fraser
2025-08-01 07:10:26 -04:00
committed by GitHub
parent f4786f2d90
commit 6ae332d543
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -326,7 +326,7 @@ namespace Robust.Client.UserInterface.Controls
var parentSize = control.Parent?.Size ?? Vector2.Zero;
var anchorLeft = control.GetValue<float>(AnchorLeftProperty);
var anchorTop = control.GetValue<float>(AnchorBottomProperty);
var anchorTop = control.GetValue<float>(AnchorTopProperty);
var anchorRight = control.GetValue<float>(AnchorRightProperty);
var anchorBottom = control.GetValue<float>(AnchorBottomProperty);