Page MenuHome GnuPG

Icons, darkmode and stuff
Open, NormalPublic

Description

Fix icons, darkmode and stuff.

My suggestion is

  • Remove all our changes, all usage of win32 api for this and such in libkleo, kleopatra, our kiconthemes patches and so on.
  • Ensure the 'common cases' works for all our software with KColorScheme, KIconThemes and whatever is in Qt6 for this
  • Test the more fringe cases of weird high contrast themes
    • Fix Q* and K* for the fringe cases where it is broken and we think they should be supported

Event Timeline

svuorela triaged this task as Normal priority.Jan 11 2024, 3:49 PM
svuorela created this task.
aheinecke added a subscriber: aheinecke.

I started working on this already since we needed to fix the current changes regarding dark mode detection. T7214: Kleopatra: Dark mode detection problems on Windows 10 2016
Darkmode detection in Qt6 works for us, but the icon theme switch does not happen.

Style selection:
The windowsvista style, which is the only style plugin Qt 6.7 builds for Windows by default, does not work for dark mode:

But using "--style fusion" on the commandline helps. Here with style fusion:

This also shows that the Breeze.colors and BreezeDark.colors are respectively loaded.

The KDE-Windows / CI Okular works by default (without adding --style fusion) as they ship a breeze6.dll as a style plugin. Without that plugin it behaves the same as Kleopatra.

But neither for us nor for KDE-Windows / CI packages are the icons changed in dark mode.
We currently (gpg4win branch work/aheinecke/qt6 Beta-146) install libKF6BreezeIcons.dll with a size of 22MB.
So that already seems suspicious since 22MB is roughly the size i remember one Theme taking.

For pinentry I used the QGuiApplication::styleHints()::colorScheme() API in T7230: pinentry-qt: Show passphrase icon nearly invisible in dark mode and high contrast so I think we finally have this covered.