From dccfa7699456b4346297eb217227aafd0d7ef37d Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 4 Apr 2026 21:05:39 +0200 Subject: [PATCH] Fix DPI issues on macOS in Editor windows --- Source/Editor/GUI/Docking/WindowDragHelper.cs | 3 +++ Source/Editor/Modules/WindowsModule.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Source/Editor/GUI/Docking/WindowDragHelper.cs b/Source/Editor/GUI/Docking/WindowDragHelper.cs index 42ae619f6..82cda3097 100644 --- a/Source/Editor/GUI/Docking/WindowDragHelper.cs +++ b/Source/Editor/GUI/Docking/WindowDragHelper.cs @@ -362,6 +362,9 @@ namespace FlaxEditor.GUI.Docking // Cache dock rectangles var size = _rectDock.Size / Platform.DpiScale; +#if PLATFORM_MAC + size *= (float)Platform.Dpi / 96.0f; // TODO: refactor DPI support to skip such hacks +#endif var offset = _toDock.PointFromScreen(_rectDock.Location); var borderMargin = 10.0f; var hintWindowsSize = HintControlSize; diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs index ec9665317..69b5b157f 100644 --- a/Source/Editor/Modules/WindowsModule.cs +++ b/Source/Editor/Modules/WindowsModule.cs @@ -702,6 +702,9 @@ namespace FlaxEditor.Modules { // Check if there is a floating window that has the same size var dpi = (float)Platform.Dpi / 96.0f; +#if PLATFORM_MAC + dpi = 1.0f; // TODO: refactor DPI support to skip such hacks +#endif var dpiScale = Platform.CustomDpiScale; var defaultSize = window.DefaultSize * dpi; for (var i = 0; i < Editor.UI.MasterPanel.FloatingPanels.Count; i++)