WPF layout (#3346)
This commit is contained in:
committed by
GitHub
parent
33d6975c25
commit
b898443f28
@@ -102,7 +102,8 @@ namespace Content.Client
|
||||
};
|
||||
|
||||
_userInterfaceManager.PopupRoot.AddChild(label);
|
||||
var minimumSize = label.CombinedMinimumSize;
|
||||
label.Measure(Vector2.Infinity);
|
||||
var minimumSize = label.DesiredSize;
|
||||
|
||||
label.InitialPos = (coordinates.Position / _userInterfaceManager.UIScale) - minimumSize / 2;
|
||||
LayoutContainer.SetPosition(label, label.InitialPos);
|
||||
@@ -149,7 +150,7 @@ namespace Content.Client
|
||||
|
||||
var position = Entity == null
|
||||
? InitialPos
|
||||
: (_eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates).Position / UIScale) - CombinedMinimumSize / 2;
|
||||
: (_eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates).Position / UIScale) - DesiredSize / 2;
|
||||
|
||||
LayoutContainer.SetPosition(this, position - (0, 20 * (TimeLeft * TimeLeft + TimeLeft)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user