summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowstheme.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QWindows11Style: Revert Windows global palette changesWladimir Leuschner2024-02-291-135/+39
| | | | | | | | | | | Revert Windows global palette changes and set the QPalette for QWindows11Style in QWindows11Style::polish Fixes: QTBUG-120571 Pick-to: 6.7 Change-Id: Iad4eb699c2dbfed38a917e6c9bc378c4262dc66e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QPA/Windows: Cleanup QShGetFileInfoThread on shutdownChristian Ehrlicher2024-01-121-83/+84
| | | | | | | | | Properly clean up the QShGetFileInfoThread on shutdown. Also rework the whole class to make it thread-safe. Fixes: QTBUG-90876 Change-Id: Iecd501ab95a6464c5f1e61f831b7288eb9578b16 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QWindowsTheme: honor dpr when requesting standard iconsChristian Ehrlicher2023-12-221-6/+9
| | | | | | | | | | | | | The devicePixelRatio was not taken into account when a standard icon was requested from the windows qpa which resulted in blurry icons for a dpr != 1. Therefore pass the dpr-corrected size to QWindowsTheme::standardPixmap() and pass this size to SHDefExtractIcon() to get a correctly scaled icon. Pick-to: 6.7 6.6 Fixes: QTBUG-52622 Change-Id: Ia771dd2f93fa133cf2c4429ef59a9c5cb05ad047 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QPA/Windows: remove uneeded USE_IIMAGELISTChristian Ehrlicher2023-12-181-20/+1
| | | | | | | | | USE_IIMAGELIST was added back in 2013 when not all platfroms supported this. Nowadays we can expect that this is available everywhere so we can remove it. Change-Id: Ia66f4bb672dcbafbfefde0a5654fa2d2397d0ce5 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QPA/Windows: misc cleanup of QShGetFileInfoThreadChristian Ehrlicher2023-12-181-7/+5
| | | | | | | | | | | Misc cleanup of QShGetFileInfoThread: - use QThread's interruption abilities instead custom one - use QMutexLocker instead manual lock/unlock Task-number: QTBUG-90876 Change-Id: If0566e56ab765fb95e837cdfa09639c1622b6d4e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QIcon: turn platform engines on by defaultVolker Hilsheimer2023-12-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | They are used when an icon is constructed via QIcon::fromTheme, unless an application-defined theme provides the requested icon. Update the documentation. For now we don't provide a way to "opt out". This might change, depending on the feedback during the Qt 6.7 beta phase. [ChangeLog][QtGui][QIcon] Qt now has implementations of native icon engines for macOS, iOS, Windows 10, Windows 11, and Android. These engines provide access to the native icon libraries and fonts, mapping standard icons to the corresponding native icon asset. Icons from application-defined themes take precedence, but the last-resort fallback icon passed as the second parameter into the QIcon::fromTheme(QString, QIcon) overload is only used if the icon is not available from the native library. See the QIcon documentation for details. Change-Id: I618e5c137c40f8e6309c0e4d4219a5a2759a475d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add initial implementation of a Windows icon engineVolker Hilsheimer2023-11-231-0/+9
| | | | | | | | | | | | | | | | Implement an icon engine for Windows that renders glyphs from the Segoe Fluent Icons font on Windows 11 and the Segoe MDL2 Assets fonts on Windows 10. These fonts are installed on the respective Windows versions by default, and otherwise freely avialable for deployment. Icons from that font will mostly be based on single code points, but as the font is specifically designed to allow combining glyphs by layering, the implementation supports multiple code points as well, and can also use a surrogate pair as well to render e.g. an emoji. Task-number: QTBUG-102346 Change-Id: Ib47a267c3a1878d8f0e00dd954496fc338bb0110 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Introduce dark mode to QWindows11StyleWladimir Leuschner2023-11-031-11/+72
| | | | | | | | Introduce dark mode to QWindows11Style and increase frame contrast on highcontrast themes. Change-Id: I18d10a314fb11828b8c3a116396e2d3cd2247b65 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Introduce new empty Windows 11 styleWladimir Leuschner2023-10-271-67/+105
| | | | | | | | | | | | | | A new empty Windows 11 style plugin is introduced and QWindowsVistaStyle module is renamed to QModernWindowsStylePlugin containing styles for Windows Vista and Windows 11. The color palette is adjusted according to the Windows 11 guidelines. [ChangeLog][Windows] Introduction of Windows 11 specific style. [ChangeLog][Windows] Renaming of QWindowsVistaStylePlugin to QModernWindowsStylePlugin Change-Id: I5f67d7e8c9a3033ffe57ecbaebbf0e3fb10c60ab Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QWindowsTheme: only set inactive accent color to Window if not setMitch Curtis2023-10-131-2/+6
| | | | | | | | | Otherwise it incorrectly changes to a white-ish color when the window becomes inactive, when native apps keep the accent color. Fixes: QTBUG-116826 Change-Id: I3837e7ca93a494e60dbe5f1b7f8607b3dd16d29e Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Use correct parameters to query highcontrastmode on WindowsWladimir Leuschner2023-09-191-1/+5
| | | | | | | | Task-number: QTBUG-113645 Change-Id: Ib400253a5589345648025c22c1487598cbefbd23 Pick-to: 6.6 6.5 Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Rename accent color in QPaletteSanthosh Kumar2023-08-181-4/+4
| | | | | | | | | | Accent color role has been renamed according to name rule of other color roles in QPalette. Fixes: QTBUG-116107 Pick-to: 6.6 Change-Id: I70ac98a1e97afbdc7ea5f8d79f808c307e170712 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix disabled and inactive group palettes for windows native styleSanthosh Kumar2023-06-261-35/+43
| | | | | | | | | | | | | | | | | | | | | The dark mode related changes for windows didn't update disabled and inactive group palettes, and this makes text in certain context (such as menu bar) appear with enabled color. The windows theme API populateLightSystemPalette() is responsible for this and it updates palettes for color roles and certain inactive scenarios but not for disabled. This patch set makes existing systemPalette(Qt::ColorScheme) to be available in QWindowsTheme and it updates palette depending on color scheme. From now on, this API updates palettes for windows native style. Its to be noted that window native style use light palette irrespective of color scheme. Fixes: QTBUG-114821 Pick-to: 6.5 6.6 Change-Id: Iff4f35900293b8e7030ec121ca21856daa094dc0 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Platform theme: fill QPalette::AccentColor with OS valueYuhang Zhao2023-06-011-20/+39
| | | | | | | | | | | The AccentColor role, added in Qt 6.6, is currently populated with a default value. This patch implements populating the brush with OS values for Windows and macOS. Change-Id: Ic243c3b8664d50db3a2096a034de6ba672d9e2d2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Windows QPA plugin: Move palette helper function to qwindowstheme.hFriedemann Kleint2023-02-201-5/+42
| | | | | | | | | | This avoids the duplication of helper functions. Amends a2518b4140ed88a674bf4a4fcf4576e35c698bb9. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: If969a6497aed3b3662621cf723772c87eb66fd23 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename Qt::Appearance to Qt::ColorSchemeTor Arne Vestbø2023-02-131-2/+2
| | | | | | | | | | | | Based on discussions in the 6.5 API review, where we concluded that 'appearance' is too general. Instead, we follow the CSS standard and use the term 'color scheme'. Pick-to: 6.5 Change-Id: I8ceaf4138ecadff5ccd962480e8e5beb39b556ec Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jonas Kvinge <jonas@jkvinge.net> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Introduce qt_winrtbase_p.hOliver Wolff2023-01-231-9/+2
| | | | | | | | | | | | | | Due to a bug in earlier Windows SDKs developers have copy paste a workaround whenever they are including winrt/base.h. In addition to that our usage winrt API also forces them to include qfactorycacheregistration_p.h whenever they include that file. To make things easier all that magic can now be done with one single include of qt_winrtbase_p.h. Pick-to: 6.4 Change-Id: Ic6a80d6d3723af381cf0ecc0f0ab43c2e6839a7d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Dark windows: use background/foreground colors for tooltipsVolker Hilsheimer2023-01-071-7/+6
| | | | | | | | | | | | | | | That follows what File Explorer on Windows 11, or the system UI does for tooltips in modern UI elements (the tooltip for the "minimize" button in a titlebar still shows the yellow-colored tooltip). Using the accent color makes the tooltip pop a lot more, but doesn't look native. Also make the toolTipPalette helper function do something useful in dark mode. Pick-to: 6.5 Change-Id: I2b07abd72eee50508f19f46aaec3408183c27100 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Overwrite dark system palette in Vista styleVolker Hilsheimer2022-12-081-49/+5
| | | | | | | | | | | | | | | | | | | | | | | | | The Vista style uses system assets for controls, and those are never dark. Because of that we cannot support dark appearance with that style, and applications using the Vista style should always use the light system palette. Override QStyle::polish(QPalette &) in the vista style to do that. To make that palette available, move the code reading the light palette into QWindowsApplication, and call that method from both the platform theme (if the system is running in light mode) and from the Vista style (only if the system is running in dark mode). If the system is dark mode and another style is used (e.g. Fusion, which works well with a dark palette), then the palette returned by the platform theme gets used without any modifications. This requires duplicating some small inline helper functions in QWindowsTheme and QWindowsApplication. We can clean this up once the implementation is complete for both Qt Widgets and Qt Quick. Change-Id: Ia13f59a2d8414642603f9708926718daf9e8954d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Proper clearing of WinRT factory cache in QWindowsThemeYuhang Zhao2022-11-251-0/+1
| | | | | | | | | | | | I've checked the whole qtbase code base, this is the only one that's left from the previous commit. Amends commit ffb9dee1b0954e4d4f9e9791175609a80ecafc31 Task-number: QTBUG-103611 Pick-to: 6.4 6.2 Change-Id: I76a9130654819d1336c27dac350f5ad56915ad81 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* win: resolve theme fonts at 96 dpiMorten Sørvig2022-11-151-8/+10
| | | | | | | | | | | | | | | | This code became out of sync with the changes to the LOGFONT_to_QFont() implementation introduced in edb00660. After that, LOGFONT_to_QFont() on longer adjusts the font size according to the DPI for the primary display. This means that the the code should also not get font metrics from the first display, but instead get metrics at 96 DPI. Fixes: QTBUG-105857 Pick-to: 6.4 6.2 Change-Id: I5974a77593e1944d889a45a352923fb9aa9a0dec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* qwindowstheme: Remove unused functionMårten Nordheim2022-10-251-12/+0
| | | | | | | | Causes warnings(-as-errors). Pick-to: 6.4 6.2 Change-Id: I77a40d9427cba277012a8343d6badd2c932798af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows: bump NTDDI_VERSION to latest version and remove some duplicated codeYuhang Zhao2022-10-241-5/+1
| | | | | | | | | | | | | | | We have NTDDI_WIN10_NI (0x0A00000C) in the Win11 SDK (10.0.22621) so bump the value in Qt (currently 0x0A00000B) to it. And when searching for _WIN32_WINNT/WINVER/NTDDI_VERSION throughout the whole qtbase codebase, I found some duplicated code, mostly leftovers from the legacy time. Replace them with our own windows header can achieve the same effect: we have defined all the necessary macros to unblock the latest features. And place the header at the top most place to include the macros as early as possible. Change-Id: I37d9ac40ca9748208c7b2e89f374eda362dbefd6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add QPlatformTheme::MenuBarFocusOnAltPressReleaseVolker Hilsheimer2022-10-231-0/+2
| | | | | | | | | | | | On Windows, pressing and releasing the Alt key moves focus to the menubar. This is implemented in widgets, but not in Qt Quick. Add a new theme hint so that we can make Qt behave natively on all platforms, and make the common style's respective styleHint default to the theme hint. Change-Id: I101bec56afd51e81ebb128c288f8a1e9b7efedb4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace QPlatformTheme::Appearance by Qt:AppearanceAxel Spoerl2022-09-201-2/+2
| | | | | | | | | | | | | With the introduction of Qt:Appearance, its predecessor in QPlatformTheme has become redundant. This patch replaces all occurrences of QPlatformTheme::Appearance with the new enum class. Task-number: QTBUG-106381 Change-Id: I5406f1b7c19f68571f074617c681318c96a6517e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Apply Q_CONSTINIT where beneficialSona Kurazyan2022-09-011-1/+1
| | | | | | | | | | Applied Q_CONSTINIT to variables with static storage duration, but skipped the POD types with core constant initializers. Task-number: QTBUG-100486 Change-Id: Iaabf824e9cb0f29a405a149912200d4e4b3573c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add QComHelper class for dealing with COM on WindowsTor Arne Vestbø2022-08-291-9/+3
| | | | | | | | | | | | | | | Unifies our approach to calling CoInitializeEx and CoUninitialize, removing a lot of boilerplate in the process, and also fixes a few bugs where we would incorrectly balance our calls to CoInitializeEx and CoUninitialize. The optimistic approach of qfilesystemengine_win.cpp of calling CoCreateInstance without initializing the COM library explicitly has been removed, as calling CoInitializeEx should be a noop in the situation where it's already been loaded. Change-Id: I9e2ec101678c2ebb9946504b5e8034e58f1bb56a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove superfluous clang preprocessor check for cpp/winrtOliver Wolff2022-08-261-7/+6
| | | | | | | | | The cpp/winrt configure test fails if clang is being used so there is no need to explicitly check for the compiler. Change-Id: Ifb2cb792cf3ea2d2ff09be6e47d741f09aec765f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Align QWindowsWindow logging category name with other platformsTor Arne Vestbø2022-08-161-2/+2
| | | | | | | Other platforms name it singular 'qt.qpa.window'. Change-Id: I668ed67e1686605fe5f77313c7a01c31fd574c32 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtBase: Windows: Replace some deprecated API usagesYuhang Zhao2022-08-031-1/+1
| | | | | | | | | | | | Microsoft recommends to use CoInitializeEx() and SetWindowLongPtr()/GetWindowLongPtr() in new code. Use COINIT_DISABLE_OLE1DDE to avoid overhead of initializing and using obsolete technology. Pick-to: 6.4 Change-Id: I9d16943e864d4487dd4f46fd9325579c298c52b9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Implement dark mode palette and accent color supportVolker Hilsheimer2022-07-291-71/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the WinRT API to read the basic colors, and construct a usable palette from those. None of the Windows.UI.ViewManagement.UISettings APIs returns a full set of usable colors -UIElementColors returns the old system colors, or useless values. And UISettings::GetColorValue only gives access to a basic palette, where e.g. the background color is just black, which doesn't match what Windows itself uses. However, we know if we want to be dark or light, and can construct a palette from the basic colors. The most relevant color to read from the system is the accent color. In the course of doing that, refactor and clean up the code somewhat to standardize the handling, and remove hardcoded color values as much as possible. This is opt-in: unless the application is started with the QPA darkmode parameter set to 2, nothing changes. Pick-to: 6.4 Task-number: QTBUG-72028 Change-Id: If603bb34c8f7478a05aafef2552a67e1e3460d29 Reviewed-by: Marius Kittler <mariuskittler@gmx.de> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Windows: Avoid accidentally copying QWindowsScreenManagerTor Arne Vestbø2022-06-201-1/+1
| | | | | | Pick-to: 6.2 6.3 6.4 Change-Id: I60b219e9a3ea62a96c369ee910eacf06d61f4f71 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Plugins: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-041-3/+5
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Windows QPA: Further cleanup of pre-Win10 codeYuhang Zhao2021-11-241-4/+1
| | | | | | | | | | | | | | | | | Mostly a removal of dynamically loaded Win32 APIs. Since Qt 6's minimum supported platform is Win10 1809 (10.0.17763, code name RS5), all these functions will be available and no need to resolve them at run-time. Things not remove: WinTab functions in "qwindowstabletsupport.cpp". Not my familiar area, so not touch it. Pick-to: 6.2 Task-number: QTBUG-84432 Change-Id: I7ad6c3bc8376f6c0e3ac90f34e22f7628efeb694 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)Yuhang Zhao2021-11-101-3/+2
| | | | | | | | | | | And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time, to unblock the developers from accessing the latest Windows APIs. Pick-to: 6.2 Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QPlatformTheme::Appearance for detecting light/dark modesMitch Curtis2021-09-171-0/+5
| | | | | | | | | And implement it on Windows and macOS. Fixes: QTBUG-83908 Fixes: QTBUG-94859 Change-Id: I7b0c062adf5d4dbaefa64c862ab8ab1348809d71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA/Vista style: Fix placeholder colorFriedemann Kleint2021-05-111-1/+10
| | | | | | | | | | Bring back the code that was removed by 62c3dd5632b04a7ee2410cc2233c0d0605ad5bd6 to the Windows theme. Pick-to: 6.1 Fixes: QTBUG-93635 Change-Id: I066e89d482a584c1719f6bfb6160710ee73e1b81 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* QIconEngine: move away from virtual_hook usageMorten Johan Sørvig2020-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Upgrade existing functions to be virtual functions: - virtual QString iconName() - virtual bool isNull() - virtual QPixmap scaledPixmap(...) - virtual QList<QSize> availableSizes(...) Make all of them non-const and remove the const_casts in the implementation. Keep the default implementation which calls virtual_hook(), for compatibility. Note: availableSizes was already virtual, but now loses the “const”. Port two overrides in the platform themes. Keep virutal_hook() around for future expansion. Task-number: QTBUG-85885 Change-Id: I76d0c9f75bfd6ca870c669047d4ef18b82c692e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move dark mode handling to the new interfaceFriedemann Kleint2020-07-251-1/+1
| | | | | | | | | | Move options to new interface, making them settable from code on this occasion. Task-number: QTBUG-83252 Change-Id: Idd80667c502a8cde5d7c66d7e597ea34c22738e7 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-2/+2
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-1/+1
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move windows font databases into QtGuiFriedemann Kleint2020-06-111-7/+12
| | | | | | | | | | Requires adapting a few config checks since cmake currently does not detect directwrite. Task-number: QTBUG-83255 Task-number: QTBUG-83931 Change-Id: I521f1924f701260b41dccbcecf87b19f08df5ccc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QAbstractFileIconEngine into QtGuiTor Arne Vestbø2020-06-031-1/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Fix wrong default font sizes after changing scalingFriedemann Kleint2020-05-261-1/+21
| | | | | | | | | | Use the ForDpi versions of retrieving non clientMetrics. Pick-to: 5.15 Task-number: QTBUG-82267 Change-Id: I434f6980c47258bfe40d38723d3f66d71217e186 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Fix disabled color of menu items in dark modeFriedemann Kleint2020-02-181-3/+2
| | | | | | | | Replace green by the standard light color. Fixes: QTBUG-82197 Change-Id: I12477a055788cc7b6c829e315d5ae9f1577770bf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Provide an experimental palette for dark modeFriedemann Kleint2020-01-251-23/+89
| | | | | | | | | Provide a simple palette for dark mode, implementing dark mode support level 2. Task-number: QTBUG-72028 Change-Id: I6f71870b251ccb7da30c01abb22c224e600f2b27 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Add detection of dark modeFriedemann Kleint2020-01-251-0/+19
| | | | | | | | | | Read the dark mode setting and make it accessible via native interface. Add a command line option to set the support level. Task-number: QTBUG-72028 Change-Id: I1e9fe296a6b1bda81512d003183038b866b67545 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Use UTF-16 literals where possibleFriedemann Kleint2019-12-161-7/+7
| | | | | | | This should minimize diffs to Qt 6. Change-Id: Id74c0b4085085984bd51251765420718d16e9fc7 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Windows QPA: Fix deprecation warningsFriedemann Kleint2019-11-201-4/+4
| | | | | | | | | | | Fix warnings introduced by qtbase/72f57cc84244633ca69ede9a1fd510b9b1881c1d: qwindowstheme.cpp:167:62: warning: 'bool QWaitCondition::wait(QMutex*, long unsigned int)' is deprecated: Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead [-Wdeprecated-declarations]qwindowstheme.cpp: In member function 'bool QShGetFileInfoThread::runWithParams(QShGetFileInfoParams*, long unsigned int)': qwindowstheme.cpp:201:63: warning: 'bool QWaitCondition::wait(QMutex*, long unsigned int)' is deprecated: Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead [-Wdeprecated-declarations] Change-Id: Ie33f8b0e1e742f972d2a8065eba9e16a13ec43ee Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>