Page MenuHome GnuPG

Kleopatra: wrong color for some button texts in "high contrast white" setting
Testing, NormalPublic

Description

On Windows 10 with the high contrast setting "contrast white", the highlight color is purple an the Text white:

The buttons in Kleo do not honor this, e.g.:



The button on the left has a lighter purple because it's background color is fading in and out.
I suspect it is no good idea to have the pre-selected buttons change background color this way as the text color needs to change in this case, too.
The pre-selected Windows explorer buttons do not do this, they are simply purple with white text.

Edit 2025-10-01:
This is similar in Windows 11 with the high contrast design "Desert":


The dark brown background should trigger a light foreground color.

Details

Version
Gpg4win 4.4

Event Timeline

ebo triaged this task as Normal priority.Mar 24 2025, 4:52 PM
ebo created this task.

After T7587: Kleopatra: High contrast mode isn't respected anymore was fixed this is what the buttons look like in Gpg4win 5:

They are okay. The selected "Tout enregistrer" (Save all) button should look like "Ausgewählter Text", i.e. white text on violet (see the below screenshot of the Folder options dialog of Windows Explorer), but I think the contrast is okay. Hence, this bug exists only in the Qt 5 based releases Gpg4win 4.4 and VSD 3.3.

ikloecker moved this task from Backlog to WIP on the vsd34 board.
ebo assigned this task to ikloecker.
ebo updated the task description. (Show Details)

I had a look at Qt 5. All of Qt's Windows styles are broken with regards to button or menu item styling. They change the background color of the hovered and/or selected button, but they use the default foreground color of the common base style class for the text. I don't think that fixing the (obsolete) Windows styles is worth the effort. As workaround we should use the Fusion style if high-contrast is active.

ikloecker mentioned this in Unknown Object (Maniphest Task).Mon, Oct 6, 9:16 AM
ikloecker changed the task status from Open to Testing.Mon, Oct 6, 3:41 PM

If a high-contrast mode is enabled then Gpg4win 4.4 (and VSD 3.4) will use the Fusion style which works much better with high contrast than the Windows XP/Vista style with animations that was used previously.