Refactor widowing on macOS to support screen scale and highDpi mode

This commit is contained in:
Wojtek Figat
2023-03-12 10:58:55 +01:00
parent 9fe54dc02c
commit 2c70b74814
5 changed files with 103 additions and 19 deletions

View File

@@ -125,9 +125,12 @@ namespace FlaxEditor.Options
options.CustomSettings.Add(e.Key, JsonSerializer.Serialize(e.Value()));
}
float prevInterfaceScale = Options.Interface.InterfaceScale;
Options = options;
OnOptionsChanged();
Platform.CustomDpiScale = Options.Interface.InterfaceScale;
// Scale interface relative to the current value (eg. when using system-provided Dpi Scale)
Platform.CustomDpiScale *= Options.Interface.InterfaceScale / prevInterfaceScale;
}
else
{