From 8998eb233029aae9a3a00943f5dcceea83b4bdfe Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 29 Dec 2020 23:20:21 +0100 Subject: [PATCH] Fix editor main window resizing edges size to be 10px --- Source/Editor/GUI/MainMenu.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/Editor/GUI/MainMenu.cs b/Source/Editor/GUI/MainMenu.cs index d6e5886bb..ba7c1a12b 100644 --- a/Source/Editor/GUI/MainMenu.cs +++ b/Source/Editor/GUI/MainMenu.cs @@ -192,13 +192,12 @@ namespace FlaxEditor.GUI if (!_window.IsMaximized) { - var winSize = RootWindow.Size * Platform.DpiScale; - /* - * Distance from which the mouse is considered to be on the border/corner - * You can change the distance by modifying the x value in : (int)(x * Platform.DpiScale) - */ - int distance = (int)(10 * Platform.DpiScale); - + var dpiScale = Platform.DpiScale; + var winSize = RootWindow.Size * dpiScale; + + // Distance from which the mouse is considered to be on the border/corner + float distance = 5.0f * dpiScale; + if (pos.Y > winSize.Y - distance && pos.X < distance) return WindowHitCodes.BottomLeft; @@ -250,7 +249,7 @@ namespace FlaxEditor.GUI } return b; } - + /// /// Adds the button. ///