From 12fd7274a9c5b8414850e7dec07c1f04ac70d9ae Mon Sep 17 00:00:00 2001 From: stefnotch Date: Mon, 29 Mar 2021 10:54:48 +0200 Subject: [PATCH] Fix DPI regression: use the overrideable RootWindow instead of _root --- Source/Engine/UI/GUI/Control.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/UI/GUI/Control.cs b/Source/Engine/UI/GUI/Control.cs index 96b7bf22b..1b6779ff8 100644 --- a/Source/Engine/UI/GUI/Control.cs +++ b/Source/Engine/UI/GUI/Control.cs @@ -313,7 +313,7 @@ namespace FlaxEngine.GUI /// /// Gets the control DPI scale factor (1 is default). Includes custom DPI scale. /// - public float DpiScale => _root?.RootWindow?.Window.DpiScale ?? Platform.DpiScale; + public float DpiScale => RootWindow?.Window.DpiScale ?? Platform.DpiScale; /// /// Gets screen position of the control (upper left corner).