Fix for the DPI issue described in #26

This commit is contained in:
Robin Krom
2020-08-05 23:51:49 +02:00
parent 850f625f23
commit de6a2b2e25
12 changed files with 197 additions and 26 deletions

View File

@@ -51,13 +51,6 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
/// </summary>
/// <param name="point">Point</param>
/// <returns>Point</returns>
public static Point GetDeviceCoordinates(Point point)
{
return new Point
{
X = (int)(point.X / SystemInfo.DpiFactorX),
Y = (int)(point.Y / SystemInfo.DpiFactorY)
};
}
public static Point GetDeviceCoordinates(Point point) => point.ScaleWithDpi();
}
}