diff options
| author | Lu YaNing <luyaning@uniontech.com> | 2024-08-09 17:42:02 +0800 |
|---|---|---|
| committer | YaNing Lu <luyaning@uniontech.com> | 2024-08-20 03:36:14 +0000 |
| commit | 7574111a56d38832fd330df5ba4839d0263fbc09 (patch) | |
| tree | 49dbddd53931177e39d9a4597632326dceae5bef /src/labs/platform/qquicklabsplatformmenu.cpp | |
| parent | 1d59ba0a607c56819127484e5b27270d29e86af3 (diff) | |
Fix multi-screen menu pop-up location
According to f8cf17166c9af147f0b8fea72f5b4a8a6098a5d7
When QT_SCALE_FACTOR is greater than 1, the Popup menu pops up
incorrectly on the second screen.
Replace the toNativePixels with toNativeLocalPosition.
Fixes: QTBUG-127906
Pick-to: 6.5 6.7 6.8
Change-Id: Id320063afccfd3a391426bc6419cbe8855c57b98
Reviewed-by: Inho Lee <inho.lee@qt.io>
Diffstat (limited to 'src/labs/platform/qquicklabsplatformmenu.cpp')
| -rw-r--r-- | src/labs/platform/qquicklabsplatformmenu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/labs/platform/qquicklabsplatformmenu.cpp b/src/labs/platform/qquicklabsplatformmenu.cpp index 22dddd7040..a6df5bbb97 100644 --- a/src/labs/platform/qquicklabsplatformmenu.cpp +++ b/src/labs/platform/qquicklabsplatformmenu.cpp @@ -695,7 +695,7 @@ void QQuickLabsPlatformMenu::open(QQmlV4FunctionPtr args) #endif } m_handle->showPopup(window, - QHighDpi::toNativePixels(targetRect, window), + QHighDpi::toNativeLocalPosition(targetRect, window), menuItem ? menuItem->handle() : nullptr); } |
