Fix DPI regression: use the overrideable RootWindow instead of _root

This commit is contained in:
stefnotch
2021-03-29 10:54:48 +02:00
parent 7456bf38f7
commit 12fd7274a9
+1 -1
View File
@@ -313,7 +313,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Gets the control DPI scale factor (1 is default). Includes custom DPI scale.
/// </summary>
public float DpiScale => _root?.RootWindow?.Window.DpiScale ?? Platform.DpiScale;
public float DpiScale => RootWindow?.Window.DpiScale ?? Platform.DpiScale;
/// <summary>
/// Gets screen position of the control (upper left corner).