See finding [5] in the Prüfbericht Barrierefreiheit GnuPG Kleopatra 3.1.20.3
Description
Revisions and Commits
rLIBKLEO Libkleo | |||
rLIBKLEO9586a995fd38 Remove obsolete SystemInfo::isDarkModeActive | |||
rLIBKLEO91a87b6dc934 Add SystemInfo::isDarkModeActive | |||
rKLEOPATRA Kleopatra | |||
rKLEOPATRA9311e50bf30d Activate breeze-dark on Windows for darkMode | |||
rW Gpg4win | |||
rWf75bb427fc4c Add detection of white high-contrast mode | |||
rWeb15c5c32969 Update dark mode detection patch | |||
rW4d0c751913fb Package breeze-dark icon theme |
Status | Assigned | Task | ||
---|---|---|---|---|
Open | None | T5824 Kleopatra: Full accessibility support | ||
Resolved | • aheinecke | T6076 Kleopatra: Many icons are hard to see if the dark high-contrast mode is activated |
Event Timeline
The standard Breeze icons (used by Kleopatra) are very dark because they are supposed to be used with a light color scheme. This can be "fixed" by the user by switching from the Breeze icon set to the Breeze Dark icon set.
But for this we would have to include the Breeze Dark icon theme in the installers and we should probably add a setting for switching between light and dark mode (at least on Windows; on Linux the users will anyway set their preferred theme for the whole desktop).
@aheinecke What do you think?
I have had some problems detecting dark mode on Windows. Qt has a command line switch darkmode=1 or darkmode=2 for the windows platform theme. Which does not help. It also checks in QWindowsTheme for dark mode in the following code:
bool QWindowsTheme::queryDarkMode() { if (QOperatingSystemVersion::current() < QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 17763) || queryHighContrast()) { return false; } const auto setting = QWinRegistryKey(HKEY_CURRENT_USER, LR"(Software\Microsoft\Windows\CurrentVersion\Themes\Personalize)") .dwordValue(L"AppsUseLightTheme"); return setting.second && setting.first == 0; }
But this is then not used throughout. So if I switch the Theme to a dark mode, the Registry Key changes accordingly but the Qt Window still is bright, even after restart. So I have commented this part of the dark Mode detection out.
DarkMode is only handled correctly for the four Windows 10 high contrast Themes. But I think these are the most important.
A finding has been that the icon theme switch is not detected at runtime. It would be nice if we could add this, especially if customers explicitly test the support for high contrast modes.
A quick research has shown that this would require us to add a nativeevent filter for WM_COLORCHANGE.
For the white high-contrast mode we use the normal (black) Breeze icons now. I think for Qt 5 that's all we can do with reasonable effort. For Qt 6/KF6 we have to revisit this anyway because a lot has changed (see T6932).
Well for 3.3 we will have full support for high contrast with the correct icons on all platforms, additionally we detect and support dark mode on all Windows 10 Versions > 1709 So this can be resolved. (Both for Qt5 and 6). What I have not yet checked if Qt6::systemInfo::colorScheme reports the correct one under windows 11 desert theme, but as you mention that is also part of a different issue where when then also should clean up the kleo systeminfo etc. if this is reliably supplied as information by qt.