Bug 410893 - Wrong WiFi icon color
Summary: Wrong WiFi icon color
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: general (show other bugs)
Version: 5.16.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-14 10:20 UTC by postix
Modified: 2019-11-29 13:43 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.0


Attachments
Screenshot of the issue. (173.96 KB, image/png)
2019-08-14 10:20 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2019-08-14 10:20:20 UTC
Created attachment 122111 [details]
Screenshot of the issue.

SUMMARY

Since updating from Plasma 5.16.3 to 5.16.4 the WiFi icon at the notification popup has the wrong color theme, i.e. it's black instead of white.


STEPS TO REPRODUCE
1. Overall look: Chooze Breeze Dark
2. Worspace color: Chooze Breeze Dark
3. Color: Chooze Breeze

OBSERVED RESULT
See Screenshot.

EXPECTED RESULT
White icons like at the plasma-nm or at places with dark backgrounds.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
Comment 1 Kai Uwe Broulik 2019-08-14 10:21:29 UTC
Plasma-nm probably sends a pixmap instead of icon name.
Comment 2 Kai Uwe Broulik 2019-08-14 10:30:31 UTC
Can't reproruce here, the network-wireless icon it uses colorizes fine here:
notify-send foo bar -i network-wireless-on
Comment 3 postix 2019-08-14 10:35:12 UTC
(In reply to Kai Uwe Broulik from comment #2)
> Can't reproruce here, the network-wireless icon it uses colorizes fine here:
> notify-send foo bar -i network-wireless-on

Have you set the color to "Breeze" instead of "Breeze dark"? 
When I set it to Breeze Dark the icon white becomes white, if I change it back to Breeze it becomes black, though due to the other color scheme settings the background keeps being dark.
Comment 4 Nate Graham 2019-08-14 13:30:04 UTC
(In reply to Postix from comment #3)
> Have you set the color to "Breeze" instead of "Breeze dark"? 
> When I set it to Breeze Dark the icon white becomes white, if I change it
> back to Breeze it becomes black, though due to the other color scheme
> settings the background keeps being dark.
That suggests that it's using an icon which responds to the color scheme, rather than an icon from the Plasma theme which colorizes itself according to the plasma theme's coloration.

What Plasma theme are you using? Breeze? or Breeze Dark?
Comment 5 Thiago Sueto 2019-08-14 16:21:18 UTC
I believe there must be a typo somewhere in plasma-nm.

After testing with Kai's example command, I found out that whenever a network-wireless-* icon is called, if the name afterwards is incorrect, for instance something silly as network-wireless-s, the command will still call icon network-wireless, and for some reason it will use its dark version.

It's fairly easy to make a typo with something like excelent instead of excellent or network-wireless-signal-symbolic instead of network-wireless-symbolic.
Comment 6 Nate Graham 2019-08-14 16:36:19 UTC
That's the standard icon name fallback logic. If you ask for icon-foo-potato, and no icon with that name exists, it will fall back to icon-foo, and so on.

What this suggests to me is is that the network-wireless-* icons come from the Plasma theme, and have the correct theme-defined colors, while network-wireless comes from the icon theme, and takes colors from the color scheme. Normally this isn't a problem, but you're using the Breeze color scheme (presumably to have light apps) with the Breeze Dark Plasma theme, so there's a discrepancy and the bug gets triggered.

Noah, any ideas?
Comment 7 Noah Davis 2019-08-15 02:57:11 UTC
I think the rest of you are forgetting the 3rd step required to reproduce it: use the *Breeze* colorscheme.

The color of the icon is #232627, which is only used by the Breeze colorscheme for the text color. This suggests that the icon is getting its color from the Breeze system colorscheme instead of the Breeze Dark Plasma theme colorscheme.

I know that the problem is not a screwed up stylesheet because the #232627 color would not be possible otherwise. The default color I use in the stylesheets for Breeze (not dark) icons is #232629.

I'm not sure why an icon being used by plasmashell is not using the colors of the Plasma theme.
Comment 8 Noah Davis 2019-08-15 03:00:26 UTC
Eh whoops, I see that most of what I wrote was already said.
Comment 9 Nate Graham 2019-08-15 03:02:54 UTC
So maybe it is a plasma-nm issue for using Icon instead of SVGItem?
Comment 10 Noah Davis 2019-08-15 03:10:48 UTC
(In reply to Nate Graham from comment #9)
> So maybe it is a plasma-nm issue for using Icon instead of SVGItem?

I'm not convinced that's the real problem because the notifications widget also uses normal icons for the Do Not Disturb icon and it doesn't have the problem.
Comment 11 Noah Davis 2019-08-15 03:24:40 UTC
Actually, there is a difference between the way plasma-nm gets the icon theme icons and the way the notifications widget does.

The notifications widget uses a Plasma Core IconItem
https://api.kde.org/frameworks/plasma-framework/html/classIconItem.html
https://cgit.kde.org/plasma-workspace.git/tree/applets/notifications/package/contents/ui/CompactRepresentation.qml#n118

plasma-nm uses a KNotification object's setIconName(const QString &icon) function
Comment 13 Noah Davis 2019-08-19 13:13:23 UTC
I think this is a plasma-nm problem.
Comment 14 Jan Grulich 2019-08-26 06:37:18 UTC
I don't think it's a plasma-nm issue. There is no other way how to specify an icon in a notification except setIconName(QString iconName). In my opinion notifications picks up an SVG icon first in case there is one, which explains why it gets affected by color scheme, then it uses pixmap icon from theme if no SVG icon is found.
Comment 16 Nate Graham 2019-11-29 13:43:21 UTC
Yep, fixed by that. --pixmaps, ++icons!