summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbitarray.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-15 12:22:53 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-29 17:18:19 +0200
commit2ffab52a4f0403468999516a4e8d6d961d778e27 (patch)
treee4250eba7ba52f189c80217520cb2f80e8e09f5e /src/corelib/tools/qbitarray.cpp
parent6d95408f1a0145745d2cf48132691c13e3ea2c17 (diff)
Windows: Implement dark mode palette and accent color support
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>
Diffstat (limited to 'src/corelib/tools/qbitarray.cpp')
0 files changed, 0 insertions, 0 deletions