Add DpiScale to RootWindow
This commit is contained in:
@@ -68,7 +68,7 @@ namespace FlaxEngine.GUI
|
||||
var parentWin = target.Root;
|
||||
if (parentWin == null)
|
||||
return;
|
||||
float dpiScale = target.RootWindow.Window.DpiScale;
|
||||
float dpiScale = target.RootWindow.DpiScale;
|
||||
Vector2 dpiSize = Size * dpiScale;
|
||||
Vector2 locationWS = target.PointToWindow(location);
|
||||
Vector2 locationSS = parentWin.PointToScreen(locationWS);
|
||||
|
||||
@@ -55,6 +55,11 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public bool IsMaximized => _window.IsMaximized;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the window DPI scale factor (1 is default). Includes custom DPI scale
|
||||
/// </summary>
|
||||
public float DpiScale => _window.DpiScale;
|
||||
|
||||
internal WindowRootControl(Window window)
|
||||
{
|
||||
_window = window;
|
||||
|
||||
Reference in New Issue
Block a user