Bug 506434 - Icon coloring is inherently incompatible with colored Breeze status icons
Summary: Icon coloring is inherently incompatible with colored Breeze status icons
Status: CONFIRMED
Alias: None
Product: Breeze
Classification: Plasma
Component: Icons (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: visual-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-01 12:50 UTC by Ingo Klöcker
Modified: 2025-07-07 15:06 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
All-white status icon in selected row (44.19 KB, image/png)
2025-07-01 12:50 UTC, Ingo Klöcker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Klöcker 2025-07-01 12:50:41 UTC
Created attachment 182833 [details]
All-white status icon in selected row

In Kleopatra we use status icons in list views to visualize the trust level of user IDs or the status of certifications. Many status icons use the positive/negative/neutral text color as primary color (with hard-coded white for the symbols), e.g. white checkmark on positive-colored rectangle, white cross on negative-colored rectangle, white exclamation mark on neutral-colored triangle, etc.

In selected rows the status icons become completely white because for the selected state KIconColors::stylesheet uses the highlighted-text color as positive/negative/neutral color. For symbolic icons that works fine and is even desired, but for the status icons the result is white symbols on white shapes. See screenshot.

I think this needs to be fixed in the Breeze icon scheme by using hard-coded colors for the status icons.
Comment 1 Andres Betts 2025-07-01 13:11:25 UTC
This issue actually happens to me also with the new Ocean icons. It's the same reason. The color for symbolic icons has to use the right colorscheme name. Otherwise, it doesn't work. I think it's all a matter of using ColorScheme-Text in combination with ColorScheme-Background. If you select colors right, it should work.
Comment 2 Ingo Klöcker 2025-07-01 15:31:50 UTC
The problem is that the status icons (data-error, data-success, data-warning, data-information) are not symbolic icons, but full colored icons with hard-coded color (white) for the symbols drawn on the colored shape (rectangle, triangle, ...) using ColorScheme-PositiveText, ColorScheme-NegativeText, etc. as color. It might work if the hard-coded white was replaced with ColorScheme-Background, but then you'd get an orange warning triangle with an almost-black exclamation mark instead of with a white exclamation-mark with Breeze Dark. Not sure if that's wanted. I assumed the white color was hard-coded for a reason.
Comment 3 Nate Graham 2025-07-05 19:37:45 UTC
Yes, it sounds like we should use hardcoded colors or apply a color-scheme-aware color to the inner symbol.

IIRC Carl created these icons. Carl, what do you think?
Comment 4 Andres Betts 2025-07-07 14:23:18 UTC
If we go the route of fully colored icons, we will need to use hardcoded colors. This likely means we have to create a light and dark variant of the icons. Leaving it up to the system to figure out the color mix might lead to undesirable results.
Comment 5 Ingo Klöcker 2025-07-07 15:06:40 UTC
(In reply to Andres Betts from comment #4)
> If we go the route of fully colored icons, we will need to use hardcoded
> colors. This likely means we have to create a light and dark variant of the
> icons. Leaving it up to the system to figure out the color mix might lead to
> undesirable results.

Breeze Light and Breeze Dark use identical colors for ForegroundNegative, ForegroundNeutral, and ForegroundPositive. This implies that the error, warning and success status icons look identical for Breeze Light and Breeze Dark. This suggests that we may not need light and dark variants of the icons. We just have to make sure that the contrast of the icons themselves (i.e. background vs. symbol color) satisfies the 3:1 contrast ratio for icons from WCAG 2.1. It's not entirely clear to me if the icons would need to have an outline to ensure sufficient contrast between icon and surrounding background.

In Kleopatra we use the status icons always additionally to text, i.e. they are just an additional visual clue and thus not essential for understanding the represented information.