Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Volker Hilsheimer 95d4e6baba ColorScheme: make QStyleHints::colorScheme writable for applications
Applications can request the color scheme to be either explicitly light
or dark, or to follow the system default by setting the scheme to
Qt::ColorScheme::Unknown.

Setting the color scheme will make the request to the QPlatformTheme
implementation, which can then use the appropriate implementation to
set the application's appearance so that both palette and window
decoration follow the requested color scheme. This should trigger
theme change and palette change events. A change to the effective
scheme should then call back into QStyleHintsPrivate::updateColorScheme,
which will emit the changed signal for the property.

Implement this for macOS (Cocoa), iOS, Android, and Windows.

On macOS, we have to use deprecated AppKit APIs; the replacements for
those APIs are not suitable for this use case. On iOS, the setting is
for each UIWindow, which we can update or initialize based on an
explicitly requested scheme.

On Android we can piggy-back on the logic added when dark theme support
was introduced in b4a9bb1f6a.

On Windows, we have to fake a dark palette if the dark scheme is
requested on a light system, as there is no API to read a dark palette.
However, we also have to ignore any application preference if a high-
contrast accessibility theme is selected by the user (we report the
color scheme as unknown; there are both light and dark high-contrast
themes), and read the system palette using the GetSysColor API, which
is used for light mode. And we need to initialize windows with the
correct frame if the application explicitly overrides the system color
scheme.

Add an auto-test to the QApplication test, as that gives us the most
coverage to confirm that QStyleHints emits the changed signal, and that
Theme- and PaletteChange events are received by the toplevel widget
when the color scheme actually changes. This test has to be skipped
on platforms where we cannot set the color scheme programmatically.

Add the option to explicitly select the color scheme to the widget
gallery example, and default it to dark mode.

Fixes: QTBUG-124490
Change-Id: I7302993c0121284bf9d3b72e3149c6abbe6bd261
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-10 01:15:12 +02:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES SQLite: Update identified license 2024-04-28 12:14:17 +02:00
bin cmake: Override generator for iOS projects to Xcode in qt-cmake.in 2024-03-18 22:34:48 +01:00
cmake Consider the qt_internal_extend_target calls when adding deps on qpa_default_plugins 2024-05-08 13:31:26 +02:00
coin CMake: Allow configuring a minimal subset of examples to deploy 2024-03-19 18:22:16 +01:00
config.tests Correct license in config.test 2024-02-20 16:22:28 +01:00
dist Remove dist/README 2024-02-29 15:35:57 +01:00
doc QDnsLookup: add support for TLSA records 2024-05-08 21:13:47 -07:00
examples ColorScheme: make QStyleHints::colorScheme writable for applications 2024-05-10 01:15:12 +02:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
mkspecs Add preliminary support for Qt for visionOS 2024-04-18 05:00:57 +02:00
qmake QMake: Fix generation of Visual Studio filter files 2024-04-19 12:47:42 +02:00
src ColorScheme: make QStyleHints::colorScheme writable for applications 2024-05-10 01:15:12 +02:00
tests ColorScheme: make QStyleHints::colorScheme writable for applications 2024-05-10 01:15:12 +02:00
util Add REUSE ignore comment 2024-05-08 11:09:28 +00:00
.cmake.conf Add preliminary support for Qt for visionOS 2024-04-18 05:00:57 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt cmake: add _extra_files IDE target from heuristics 2024-04-12 08:36:01 +08:00
config_help.txt Add support for using an inline namespaces for -qtnamespace 2024-04-03 17:17:11 +02:00
configure Change configure license 2024-02-02 15:23:02 +00:00
configure.bat configure.bat: Fix errors on Windows 2024-03-05 11:56:24 +01:00
configure.cmake Make version_tagging the full-functional feature 2024-05-07 12:10:22 +02:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
licenseRule.json Add license exception 2024-04-24 19:02:09 +02:00
qt_cmdline.cmake Remove superfluous entries from qt_cmdline.cmake 2024-05-03 18:42:37 +02:00