Address review comments
This commit is contained in:
@@ -555,17 +555,17 @@ public:
|
||||
API_PROPERTY() static BatteryInfo GetBatteryInfo();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the screen DPI setting.
|
||||
/// Gets the primary monitor's DPI setting.
|
||||
/// </summary>
|
||||
API_PROPERTY() static int32 GetDpi();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the screen DPI setting scale factor (1 is default). Includes custom DPI scale.
|
||||
/// Gets the primary monitor's DPI setting scale factor (1 is default). Includes custom DPI scale.
|
||||
/// </summary>
|
||||
API_PROPERTY() static float GetDpiScale();
|
||||
|
||||
/// <summary>
|
||||
/// The custom screen DPI scale factor to apply globally. Can be used to adjust the User Interface scale (resolution).
|
||||
/// The custom DPI scale factor to apply globally. Can be used to adjust the User Interface scale (resolution).
|
||||
/// </summary>
|
||||
API_FIELD() static float CustomDpiScale;
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace FlaxEngine.GUI
|
||||
/// <summary>
|
||||
/// Gets the GUI window root control which contains that control (or null if not linked to any).
|
||||
/// </summary>
|
||||
public virtual WindowRootControl RootWindow => _parent?.RootWindow; // TODO: Why doesn't this just go "_root?.RootWindow" or something?
|
||||
public virtual WindowRootControl RootWindow => _root?.RootWindow;
|
||||
|
||||
/// <summary>
|
||||
/// Gets screen position of the control (upper left corner).
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void SyncBackbufferSize()
|
||||
{
|
||||
float scale = ResolutionScale * (Root?.RootWindow?.Window?.DpiScale ?? 1); // TODO: Figure this out
|
||||
float scale = ResolutionScale * (RootWindow?.DpiScale ?? Platform.DpiScale);
|
||||
int width = Mathf.CeilToInt(Width * scale);
|
||||
int height = Mathf.CeilToInt(Height * scale);
|
||||
if (_customResolution.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user