Merge remote-tracking branch 'origin/1.6' into 1.6

This commit is contained in:
Wojtek Figat
2023-03-13 10:26:13 +01:00
23 changed files with 157 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
{

View File

@@ -153,7 +153,7 @@ void SplashScreen::Show()
LOG(Info, "Showing splash screen");
// Create window
const float dpiScale = (float)Platform::GetDpi() / (float)DefaultDPI;
const float dpiScale = Platform::GetDpiScale();
CreateWindowSettings settings;
settings.Title = TEXT("Flax Editor");
settings.Size.X = 500 * dpiScale;