Page MenuHome GnuPG

Kleopatra: Update custom colored UI elements when colors change
Testing, NormalPublic

Description

Kleopatra uses a few custom colored UI elements, e.g. the compliance label in the status bar and the Sign & Encrypt buttons (if de-vs mode is active). Currently, the colors are not updated when the user changes the color scheme (e.g. from a light scheme to a dark scheme) or when the user activates high-contrast mode. This needs to be fixed.

List of UI elements:

  • Compliance label in the status bar (VSD only)
  • Sign & Encrypt buttons of
    • Sign & Encrypt Files dialog (VSD only)
    • Sign & Encrypt Clipboard dialog (VSD only)
    • Notepad (VSD only)
    • Key Approval dialog used by GpgOL (VSD only)
  • Error labels:
    • "Invalid hostname" label in directory service configuration
    • Error labels in New OpenPGP Certificate dialog
  • List items in Self-Test result
  • Result items of Sign & Encrypt workflow and Decrypt & Verify workflow
  • Result box in Notepad window

Screenshot demonstrating some of the problems:


How to reproduce:

  • Enable high-contrast scheme Contrast No. 1 and switch Kleopatra to Default color scheme
  • Open New OpenPGP Certificate window and enter an invalid email address
  • Switch Kleopatra to some Breeze color scheme (e.g. Breeze Dark) or disable high-contrast
  • Open another New OpenPGP Certificate window and enter an invalid email address
  • Enable high-contrast scheme Contrast White and switch Kleopatra to Default color scheme
  • Open another New OpenPGP Certificate window and enter an invalid email address

Expected:

  • In all three New OpenPGP Certificate windows the error message for the email address should be shown black on white (for Contrast White); in general, if a high-contrast color scheme is used then the error message should be shown in the same color as the other text; if a non-high-contrast color scheme is used then the error message should be shown in the normal error color (i.e. usually some red)
  • Text and arrow of the "Advanced Options" button should be displayed using the normal text color or the button text color.

Event Timeline

ikloecker created this task.
ikloecker changed the task status from Open to Testing.Jun 24 2025, 11:56 AM

Many issues have been fixed. Setting to Testing to check what I have missed.

Note for testing:
For the main windows which the users may keep open for a longer time (e.g. main window, notepad, smart card window) color switching should work. In some windows there may still be UI elements that are not adjusted when the user changes the color scheme (e.g. from a light scheme to a dark scheme in Windows or via the options in Kleopatra's menu) or when the user activates high-contrast mode. We need to decide whether that's a problem because usually reopening the window fixes the problem and usually people don't switch the color scheme all of the time.

Moving to QA. All changes should be in the latest beta.

Mostly looks good to me on gpg4win-5.0.0-beta336 @ win10/win11.

Issues found:

  • I understood, that in high contrast mode a kleopatra color theme switch should not change the error message color. This is not the case. The chosen color theme overrides everything and a switch of contrast mode changes only the window frame. It's the same behaviour, if a non default color theme is set and the high contrast mode is enabled/disabled. In the default color theme the error color is correctly switched on contrast mode changes. non default schemes should overwrite all contrast mode colors, which works as expected

Transient dialogs (just a note for the "to be discussed" category):

  • decrypt/verify result: links/icons keep the color on windows contrast switch

One screenshot of the test setup for reference:

I tested the VSD elements on gpg4win-5.0.0-beta336 @ win10 (beta compliance mode).

Sceenshot for reference:

Issues found:

  • compliance note in sign/encrypt next to sign/encrypt button (both for file and clipboard) unreadable in black/nr1/nr2 and also in dark mode:
  • cert list colors don't change in dark mode (contrast changes in default theme are fine)

Still untested:

  • Key Approval dialog used by GpgOL (VSD only)
  • compliance note in sign/encrypt next to sign/encrypt button (both for file and clipboard) unreadable in black/nr1/nr2 and also in dark mode:

This needs to be fixed.

  • cert list colors don't change in dark mode (contrast changes in default theme are fine)

Yes, we don't have a "dark scheme" for the VSD certificate category colors. People should be able to set their own colors.

ikloecker changed the task status from Testing to Open.Jun 30 2025, 12:20 PM
ikloecker moved this task from QA to WIP on the gpd5x board.
ikloecker changed the task status from Open to Testing.Jun 30 2025, 4:40 PM
  • compliance note in sign/encrypt next to sign/encrypt button (both for file and clipboard) unreadable in black/nr1/nr2 and also in dark mode:

This is now fixed.

Looks good to me on gpg4win-5.0.0-beta345 @ win10


Still untested:

  • Key Approval dialog used by GpgOL (VSD only)