From 30c1068a13c18b704cb4966afe7575920933d919 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 30 May 2024 08:38:42 -0500 Subject: [PATCH] Fix wrong spacing calculation. --- Source/Engine/UI/GUI/Panels/UniformGridPanel.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Engine/UI/GUI/Panels/UniformGridPanel.cs b/Source/Engine/UI/GUI/Panels/UniformGridPanel.cs index 2353a5d99..80d96f7c2 100644 --- a/Source/Engine/UI/GUI/Panels/UniformGridPanel.cs +++ b/Source/Engine/UI/GUI/Panels/UniformGridPanel.cs @@ -142,16 +142,16 @@ namespace FlaxEngine.GUI { if (y == 0) { - slotBounds.Height -= _slotSpacing.Y * 0.5f * slotsV; + slotBounds.Height -= _slotSpacing.Y * 0.5f; } else if (y == slotsV - 1) { - slotBounds.Height -= _slotSpacing.Y * 0.5f * slotsV; - slotBounds.Y += _slotSpacing.Y * 0.5f * slotsV; + slotBounds.Height -= _slotSpacing.Y * 0.5f; + slotBounds.Y += _slotSpacing.Y * 0.5f; } else { - slotBounds.Height -= _slotSpacing.Y * 0.5f * slotsV; + slotBounds.Height -= _slotSpacing.Y; slotBounds.Y += _slotSpacing.Y * 0.5f; } } @@ -160,16 +160,16 @@ namespace FlaxEngine.GUI { if (x == 0) { - slotBounds.Width -= _slotSpacing.X * 0.5f * slotsH; + slotBounds.Width -= _slotSpacing.X * 0.5f; } else if (x == slotsH - 1) { - slotBounds.Width -= _slotSpacing.X * 0.5f * slotsH; - slotBounds.X += _slotSpacing.X * 0.5f * slotsH; + slotBounds.Width -= _slotSpacing.X * 0.5f; + slotBounds.X += _slotSpacing.X * 0.5f; } else { - slotBounds.Width -= _slotSpacing.X * 0.5f * slotsH; + slotBounds.Width -= _slotSpacing.X; slotBounds.X += _slotSpacing.X * 0.5f; } }