From dce0274a1c9c4e7c321bdb8b713c03b1bb3ab00f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 28 Feb 2024 20:48:11 +0100 Subject: [PATCH] Fix regression in type search highlights from #2268 --- Source/Editor/GUI/ItemsListContextMenu.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Editor/GUI/ItemsListContextMenu.cs b/Source/Editor/GUI/ItemsListContextMenu.cs index cf0ce83ac..78fbcd779 100644 --- a/Source/Editor/GUI/ItemsListContextMenu.cs +++ b/Source/Editor/GUI/ItemsListContextMenu.cs @@ -122,6 +122,10 @@ namespace FlaxEditor.GUI if (IsMouseOver || IsFocused) Render2D.FillRectangle(new Rectangle(Float2.Zero, Size), style.BackgroundHighlighted); + // Indent for drop panel items is handled by drop panel margin + if (Parent is not DropPanel) + textRect.Location += new Float2(Editor.Instance.Icons.ArrowRight12.Size.X + 2, 0); + // Draw all highlights if (_highlights != null) { @@ -134,13 +138,9 @@ namespace FlaxEditor.GUI Render2D.FillRectangle(rect, color); } } - // Indent for drop panel items is handled by drop panel margin - var indent = Float2.Zero; - if (Parent is not DropPanel) - indent = new Float2(Editor.Instance.Icons.ArrowRight12.Size.X + 2, 0); // Draw name - Render2D.DrawText(style.FontSmall, Name, textRect + indent, TintColor * (Enabled ? style.Foreground : style.ForegroundDisabled), TextAlignment.Near, TextAlignment.Center); + Render2D.DrawText(style.FontSmall, Name, textRect, TintColor * (Enabled ? style.Foreground : style.ForegroundDisabled), TextAlignment.Near, TextAlignment.Center); } ///