Fix DPI issues on macOS in Editor windows

This commit is contained in:
2026-04-04 21:05:39 +02:00
parent 9ffa1abb54
commit dccfa76994
2 changed files with 6 additions and 0 deletions
@@ -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;
+3
View File
@@ -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++)