diff --git a/mRemoteV1/UI/DisplayProperties.cs b/mRemoteV1/UI/DisplayProperties.cs index 23e989ce..905e0ab5 100644 --- a/mRemoteV1/UI/DisplayProperties.cs +++ b/mRemoteV1/UI/DisplayProperties.cs @@ -1,4 +1,5 @@ -using System.Drawing; +using System; +using System.Drawing; using System.Windows.Forms; namespace mRemoteNG.UI @@ -10,6 +11,15 @@ namespace mRemoteNG.UI public SizeF ResolutionScalingFactor { get; } = GetResolutionScalingFactor(); + /// + /// Scale the given nominal width value by the + /// + /// + public int CalculateScaledWidth(int width) + { + return (int) Math.Round(width * ResolutionScalingFactor.Width); + } + private static SizeF GetResolutionScalingFactor() { using (var g = new Form().CreateGraphics())