Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
2248487c6ca9d5459c70a16868d5aeee07d96157 (qt/qtbase/dev) 77659e03393820daace991c28021cfb8b67f871a (qt/qtbase/6.2)
Description
There are a couple of ways that we're checking which system theme is in use:
- https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/utils/theme/theme.cpp?id=d0f8fdff0d5762a212a4532973f9fefdf57aa4d7#n246
- https://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/src/quickcontrols2/qquickstyle.cpp?id=40e92d86a7601b06a83c5cbc44c85847d1cb46f7#n413
Having a QPA API for this would be much better.
We could do this by adding e.g. a SystemTheme enum to QPlatformTheme:
enum SystemTheme {
DarkTheme,
LightTheme,
OtherTheme
};
Attachments
Issue Links
- is required for
-
QTBUG-74210 It would be nice if there is an api to detect what mode is active (Dark/light)
-
- Closed
-
- relates to
-
QTBUG-68850 Qt Applications are not usable under macOS Mojave with dark theme
-
- Closed
-
-
QTBUG-83908 Material.System does not work on Windows 10 in Dark Mode
-
- Closed
-
-
QTBUG-93815 Dark mode does not work when theme Material.System is used
-
- Closed
-
-
QTBUG-93955 Material.System does not work on Ubuntu (Gnome)
-
- Closed
-
-
QTBUG-72028 Add support for Windows dark mode
-
- Closed
-
-
QTBUG-78913 Material.System should follow system theme on Android Q and up
-
- Closed
-
-
QTBUG-97910 Support runtime theme switching
-
- Reported
-
-
QTBUG-88043 Event informing that the device has switched to Night(Dark) mode or vice versa
-
- Closed
-
For Gerrit Dashboard: QTBUG-94859 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
357256,10 | Add QPlatformTheme::Appearance for detecting light/dark modes | dev | qt/qtbase | Status: MERGED | +2 | 0 |
357262,7 | QWindowsTheme: implement appearance() | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |
357787,1 | QQuickStyle: use systemTheme() to detect dark mode | dev | qt/qtquickcontrols2 | Status: ABANDONED | 0 | 0 |
367559,3 | QQuickStyle: use systemTheme() to detect dark mode | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
367622,4 | macOS: Use new QPlatformTheme::appearance() function | dev | qt/qtbase | Status: MERGED | +2 | 0 |
375647,2 | QQuickStyle: use systemTheme() to detect dark mode | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
375648,2 | Add QPlatformTheme::Appearance for detecting light/dark modes | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
375649,2 | macOS: Use new QPlatformTheme::appearance() function | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |