Page MenuHome GnuPG

Kleopatra: Many icons are hard to see if the dark high-contrast mode is activated
Open, WishlistPublic

Description

See finding [5] in the Prüfbericht Barrierefreiheit GnuPG Kleopatra 3.1.20.3

Event Timeline

ikloecker triaged this task as Normal priority.Jul 13 2022, 4:22 PM
ikloecker created this task.

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?

aheinecke moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

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.

aheinecke moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Sep 5 2022, 4:49 PM
aheinecke lowered the priority of this task from Normal to Wishlist.Feb 28 2023, 11:22 AM
aheinecke moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

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.