qt6-bb10/src/plugins
Thorbjørn Lund Martsum 8c0153a526 Fix QMenu (+other theme) sizes on Windows multiscreen systems
The reason this worked before is unclear. It could be suspected
that we have made a dpi awareness change or Microsoft changed
the behavior of the OpenThemeData function.

Regardless, we expect the result to match the primary display which
OpenThemeData doesn't do (anymore). Instead it returns a value based on
the hwnd screen (which btw didn't always match the widget) and the cache
system would then re-use that theme also for hwnds on other screens.

The most obvious solution is to use OpenThemeDataForDpi to make sure
we get a theme result matching the primary sceen. Then our correction
of the result by with multiplying
QWindowsStylePrivate::nativeMetricScaleFactor(widget)
works again.

This fix does not only fix QMenu sizes. It fixes the size for all
widgets that use this theme function, which could return near
random results before.

We load this library dynamically since MinGW 11.2.0 won't link with it.

[ChangeLog][QWidgets][QMenu] Fixed menu sizes on Windows systems
with more screens.

Fixes: QTBUG-112911
Pick-to: 6.5
Change-Id: I8fdfde2ef5b2aa407cbc74c85afe2c0b74026cff
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-05-10 05:36:09 +02:00
..
doc/snippets/code Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
generic Rid of 'special case' markers 2023-04-13 18:30:58 +02:00
imageformats Utilize NO_UNITY_BUILD arguments instead of manual exclusion 2023-03-14 17:28:44 +01:00
networkinformation QNetworkInformation[Win]: Improve WinRT exceptions handling 2023-04-18 11:39:20 +00:00
platforminputcontexts IBus: fix missing Q_SLOTS 2023-04-05 01:27:47 +04:00
platforms macOS: Clear event dispatcher interrupt before running NSAlert modal session 2023-05-10 00:20:18 +00:00
platformthemes QGtk3Theme: Improve fixed font delivery 2023-04-20 14:01:22 +02:00
printsupport Fix build with -no-feature-lineedit 2023-03-04 09:45:21 +00:00
sqldrivers SQL: replace qPrintable() / toLocal8Bit() with unicode versions 2023-04-18 00:11:05 +02:00
styles Fix QMenu (+other theme) sizes on Windows multiscreen systems 2023-05-10 05:36:09 +02:00
tls Schannel: Add support for import of PKCS12/PFX files 2023-05-05 19:58:36 +02:00
tracing Fix crash at exit when tracing 2023-04-26 10:46:06 +00:00
CMakeLists.txt Move CTF tracing plugin to plugins directory 2023-03-21 10:06:32 +02:00