diff --git a/OpenRA.Mods.Common/Widgets/Logic/SimpleTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SimpleTooltipLogic.cs index ededbfa962..de350cb159 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SimpleTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SimpleTooltipLogic.cs @@ -26,11 +26,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic tooltipContainer.BeforeRender = () => { labelText = getText(); - var textWidth = font.Measure(labelText).X; - if (textWidth != cachedWidth) + var textDim = font.Measure(labelText); + if (textDim.X != cachedWidth) { - label.Bounds.Width = textWidth; - widget.Bounds.Width = 2 * label.Bounds.X + textWidth; + label.Bounds.Width = textDim.X; + widget.Bounds.Width = 2 * label.Bounds.X + textDim.X; + label.Bounds.Height = textDim.Y; + widget.Bounds.Height = 4 * label.Bounds.Y + textDim.Y; } };