mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
spell checker
This commit is contained in:
@@ -41,9 +41,9 @@ namespace ProjectsEditor.Utils
|
||||
|
||||
internal static double GetScreenDpiFromScreen(Screen screen)
|
||||
{
|
||||
var pnt = new System.Drawing.Point(screen.Bounds.Left + 1, screen.Bounds.Top + 1);
|
||||
var mon = NativeMethods.MonitorFromPoint(pnt, 2/*MONITOR_DEFAULTTONEAREST*/);
|
||||
NativeMethods.GetDpiForMonitor(mon, NativeMethods.DpiType.EFFECTIVE, out uint dpiX, out uint dpiY);
|
||||
var point = new System.Drawing.Point(screen.Bounds.Left + 1, screen.Bounds.Top + 1);
|
||||
var monitor = NativeMethods.MonitorFromPoint(point, 2/*MONITOR_DEFAULTTONEAREST*/);
|
||||
NativeMethods.GetDpiForMonitor(monitor, NativeMethods.DpiType.EFFECTIVE, out uint dpiX, out uint dpiY);
|
||||
return dpiX / 96.0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user