From 960056d300146f86eac01baa167aa32accf3b23a Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 14 Aug 2020 14:13:42 +0100 Subject: [PATCH] Fix mod switcher icon handling. --- .../Widgets/Logic/ConnectionLogic.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs index e2c8aee517..f4ce82517d 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs @@ -217,23 +217,23 @@ namespace OpenRA.Mods.Common.Widgets.Logic return mod.Icon; }; - } - if (logo != null && mod.Icon == null) - { - // Hide the logo and center just the text - if (title != null) - title.Bounds.X = logo.Bounds.Left; + if (mod.Icon == null) + { + // Hide the logo and center just the text + if (title != null) + title.Bounds.X = logo.Bounds.X; - if (version != null) - version.Bounds.X = logo.Bounds.X; + if (version != null) + version.Bounds.X = logo.Bounds.X; - width -= logo.Bounds.Width; - } - else - { - // Add an equal logo margin on the right of the text - width += logo.Bounds.Width; + width -= logo.Bounds.Width; + } + else + { + // Add an equal logo margin on the right of the text + width += logo.Bounds.Width; + } } var container = panel.GetOrNull("MOD_CONTAINER");