diff --git a/OpenRA.Mods.Common/Widgets/Logic/PlayerProfileLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/PlayerProfileLogic.cs index dcb17c1ce4..3fb984658f 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/PlayerProfileLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/PlayerProfileLogic.cs @@ -322,8 +322,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (client.Location != null) { + var locationFont = Game.Renderer.Fonts[locationLabel.Font]; + var locationWidth = widget.Bounds.Width - 2 * locationLabel.Bounds.X; + var location = WidgetUtils.TruncateText(client.Location, locationWidth, locationFont); locationLabel.IsVisible = () => true; - locationLabel.GetText = () => client.Location; + locationLabel.GetText = () => location; widget.Bounds.Height += locationLabel.Bounds.Height; ipLabel.Bounds.Y += locationLabel.Bounds.Height; adminLabel.Bounds.Y += locationLabel.Bounds.Height;