Fix DPI issues on macOS in Editor windows
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user