From ed5450d7e68332d4beae10cabc7067d2fe46a9af Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 21 Dec 2020 11:49:02 +0100 Subject: [PATCH] Fix context menu positioning for child menus when flipping the direction over Y axis --- Source/Editor/GUI/ContextMenu/ContextMenuBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs b/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs index ec9c0dfb8..7fb3fe38a 100644 --- a/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs +++ b/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs @@ -136,6 +136,10 @@ namespace FlaxEditor.GUI.ContextMenu // Direction: up isUp = true; locationSS.Y -= dpiSize.Y; + + // Offset to fix sub-menu location + if (parent is ContextMenu menu && menu._childCM != null) + locationSS.Y += 30.0f * dpiScale; } if (monitorBounds.Right < rightBottomLocationSS.X) {