mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[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:
@@ -129,6 +129,12 @@ IFACEMETHODIMP QoiPreviewHandler::SetRect(const RECT* prc)
|
||||
HRESULT hr = E_INVALIDARG;
|
||||
if (prc != NULL)
|
||||
{
|
||||
if (m_rcParent.left == 0 && m_rcParent.top == 0 && m_rcParent.right == 0 && m_rcParent.bottom == 0 && (prc->left != 0 || prc->top != 0 || prc->right != 0 || prc->bottom != 0))
|
||||
{
|
||||
// QoiPreviewHandler position first initialisation, do the first preview
|
||||
m_rcParent = *prc;
|
||||
DoPreview();
|
||||
}
|
||||
if (!m_resizeEvent)
|
||||
{
|
||||
Logger::error(L"Failed to create resize event for QoiPreviewHandler");
|
||||
@@ -153,6 +159,11 @@ IFACEMETHODIMP QoiPreviewHandler::DoPreview()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (m_rcParent.left == 0 && m_rcParent.top == 0 && m_rcParent.right == 0 && m_rcParent.bottom == 0)
|
||||
{
|
||||
// Postponing Start QoiPreviewHandler.exe, position not yet initialized. preview will be done after initialisation
|
||||
return S_OK;
|
||||
}
|
||||
Logger::info(L"Starting QoiPreviewHandler.exe");
|
||||
|
||||
STARTUPINFO info = { sizeof(info) };
|
||||
|
||||
Reference in New Issue
Block a user