QComboBoxPrivate::showNativePopup(): Scale target rectangle
The QPlatform* classes operate in native pixels. Task-number: QTBUG-55251 Change-Id: I80490fa802fbc77a1e02c176528cc047630f9a7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
1ffc6ba402
commit
1cc15c4b6d
@ -66,6 +66,7 @@
|
|||||||
#include <qabstractproxymodel.h>
|
#include <qabstractproxymodel.h>
|
||||||
#include <qstylehints.h>
|
#include <qstylehints.h>
|
||||||
#include <private/qguiapplication_p.h>
|
#include <private/qguiapplication_p.h>
|
||||||
|
#include <private/qhighdpiscaling_p.h>
|
||||||
#include <private/qapplication_p.h>
|
#include <private/qapplication_p.h>
|
||||||
#include <private/qcombobox_p.h>
|
#include <private/qcombobox_p.h>
|
||||||
#include <private/qabstractitemmodel_p.h>
|
#include <private/qabstractitemmodel_p.h>
|
||||||
@ -2550,7 +2551,8 @@ bool QComboBoxPrivate::showNativePopup()
|
|||||||
else if (q->testAttribute(Qt::WA_MacMiniSize))
|
else if (q->testAttribute(Qt::WA_MacMiniSize))
|
||||||
offset = QPoint(-2, 6);
|
offset = QPoint(-2, 6);
|
||||||
|
|
||||||
m_platformMenu->showPopup(tlw, QRect(tlw->mapFromGlobal(q->mapToGlobal(offset)), QSize()), currentItem);
|
const QRect targetRect = QRect(tlw->mapFromGlobal(q->mapToGlobal(offset)), QSize());
|
||||||
|
m_platformMenu->showPopup(tlw, QHighDpi::toNativePixels(targetRect, tlw), currentItem);
|
||||||
|
|
||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
// The Cocoa popup will swallow any mouse release event.
|
// The Cocoa popup will swallow any mouse release event.
|
||||||
|
Loading…
Reference in New Issue
Block a user