[PreviewPane]Fix location and scaling issues with different DPI (#31802)

* [PreviewPane] Monaco Previewer: await initial position, size update + use recieved coordinates

* Fixing size and position issue for all file explorer previewers
This commit is contained in:
Laszlo Nemeth
2024-03-20 15:28:43 +01:00
committed by GitHub
parent f5797a065a
commit 58e598815c
13 changed files with 85 additions and 15 deletions

View File

@@ -29,11 +29,11 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode
string filePath = args[0];
int hwnd = Convert.ToInt32(args[1], 16);
Rectangle s = default(Rectangle);
int left = Convert.ToInt32(args[2], 10);
int right = Convert.ToInt32(args[3], 10);
int top = Convert.ToInt32(args[4], 10);
int bottom = Convert.ToInt32(args[5], 10);
Rectangle s = new Rectangle(left, top, right - left, bottom - top);
_previewHandlerControl = new GcodePreviewHandlerControl();
_previewHandlerControl.SetWindow((IntPtr)hwnd, s);