diff --git a/Source/Engine/UI/GUI/Control.cs b/Source/Engine/UI/GUI/Control.cs index fb6424b58..597cc9e41 100644 --- a/Source/Engine/UI/GUI/Control.cs +++ b/Source/Engine/UI/GUI/Control.cs @@ -315,7 +315,7 @@ namespace FlaxEngine.GUI /// /// Gets the control DPI scale factor (1 is default). Includes custom DPI scale. /// - public float DpiScale => _root?.RootWindow?.DpiScale ?? Platform.DpiScale; + public float DpiScale => _root?.RootWindow?.Window.DpiScale ?? Platform.DpiScale; /// /// Gets screen position of the control (upper left corner). diff --git a/Source/Engine/UI/GUI/WindowRootControl.cs b/Source/Engine/UI/GUI/WindowRootControl.cs index a8028ebe8..1e9785195 100644 --- a/Source/Engine/UI/GUI/WindowRootControl.cs +++ b/Source/Engine/UI/GUI/WindowRootControl.cs @@ -55,11 +55,6 @@ namespace FlaxEngine.GUI /// public bool IsMaximized => _window.IsMaximized; - /// - /// Gets the window DPI scale factor (1 is default). Includes custom DPI scale - /// - public float DpiScale => _window.DpiScale; - internal WindowRootControl(Window window) { _window = window;