Files
RobustToolbox/Robust.Client/UserInterface/Controls/WindowRoot.cs
T
Pieter-Jan Briers 1f948e17c4 Disable automatic UI scaling for non-main windows by default
This causes tons of problems with OpenDream's small popup windows, and even for SS14 it doesn't make much sense.

The behavior can be re-enabled per window by setting WindowRoot.DisableAutoScaling to false.
2023-12-28 03:38:20 +01:00

31 lines
978 B
C#

using Robust.Client.Graphics;
using Robust.Shared;
using Robust.Shared.Maths;
using Robust.Shared.ViewVariables;
namespace Robust.Client.UserInterface.Controls
{
public sealed class WindowRoot : UIRoot
{
internal WindowRoot(IClydeWindow window)
{
Window = window;
}
public override float UIScale => UIScaleSet;
internal float UIScaleSet { get; set; }
public override IClydeWindow Window { get; }
/// <summary>
/// Disable automatic scaling of window <see cref="UIScale"/> based on resolution.
/// </summary>
/// <remarks>
/// <para>
/// Disabled by default for non-main windows as those most likely are smaller popup windows,
/// that won't make sense with the default parameters.
/// </para>
/// </remarks>
/// <seealso cref="CVars.ResAutoScaleEnabled"/>
public bool DisableAutoScaling { get; set; } = true;
}
}