Bug 366062 - Icons for Electron apps are too large in the System Tray
Summary: Icons for Electron apps are too large in the System Tray
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.7.2
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL: https://github.com/MarshallOfSound/Go...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-24 23:49 UTC by Cyan
Modified: 2018-08-13 21:55 UTC (History)
14 users (show)

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


Attachments
electron apps tray icons bug (14.25 KB, image/png)
2016-08-17 05:08 UTC, Victor Prudniy
Details
Zoom panel 100% (4.23 KB, image/png)
2016-10-31 15:24 UTC, varlesh
Details
compare (42.11 KB, image/png)
2016-10-31 19:44 UTC, varlesh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyan 2016-07-24 23:49:41 UTC
For most Electron apps, their icons in the System Tray are oversized, resulting in them being unrecognizable colourful squares. The provided URL shows one example of this issue, in which two other examples are also linked to.

Reproducible: Always

Steps to Reproduce:
1. Install an Electron app in KDE Plasma 5
2. Observe its oversized System Tray icon

Actual Results:  
System Tray icon for Electron app is too large.

Expected Results:  
System tray icon for Electron app is standard size.
Comment 1 Marco Martin 2016-08-16 12:03:05 UTC
screenshot?
Comment 2 Victor Prudniy 2016-08-17 05:08:32 UTC
Created attachment 100642 [details]
electron apps tray icons bug
Comment 3 Victor Prudniy 2016-08-17 05:09:33 UTC
Comment on attachment 100642 [details]
electron apps tray icons bug

Same here.
plasmashell 5.7.3
On this screen 3 electron apps. Discord icon is ok, but skype and facebook messenger is broken.
Comment 4 Lena Stöffler 2016-08-29 18:27:34 UTC
This is reproducible with most Electron apps which place a icon in the system tray ─ not with all (Discord for example works fine). The icons are too big (oversized) most of the times and won't fit in. To be honest, its an visual distration.
Comment 5 Guo Yunhe 2016-09-30 14:34:57 UTC
You can try to delete plasma configuration files ~/.config/

I solved my problems by doing so, using KDE Plasma 5.7.95. Hope it is helpful for you too.
Comment 6 varlesh 2016-10-31 15:24:38 UTC
Created attachment 101919 [details]
Zoom panel 100%
Comment 7 varlesh 2016-10-31 15:24:58 UTC
Now for Plasma use only 22px icons for tray... BUT GTK-apps (chrome/chromium) and Electron-apps (wire, nylas and etc) use over 21px icon size on system tray - it's blurred icons and spoil style. 

For example, Electron-app (Wire) on plasma tray:
- Original icon change with hardcode-tray script for better looking this bug
- Original icon size 22px - green square, 16px - red square.

- On Plasma panel icon cropped to green square 21px or 20,5px and red square cropped to 14,5px or 15px

Please see this post:
https://github.com/bil-elmoussaoui/Hardcode-Tray/issues/183

Attached file - see green/red icon have oreol

OS: KDE Neon 5.8.2
Comment 8 Marco Martin 2016-10-31 16:36:44 UTC
(In reply to varlesh from comment #7)
> Now for Plasma use only 22px icons for tray... BUT GTK-apps
> (chrome/chromium) and Electron-apps (wire, nylas and etc) use over 21px icon
> size on system tray - it's blurred icons and spoil style. 
> 
> For example, Electron-app (Wire) on plasma tray:
> - Original icon change with hardcode-tray script for better looking this bug
> - Original icon size 22px - green square, 16px - red square.

I tried wire, and wile the icon definitely doesn't looks that good (scaled down) its final rendered size is definitely correct.
I see that wire only provides icons of 32x32 and 256x256 (on the AppImage i tried, /tmp/.mount_b6cHwU/usr/share/icons/default/)

any particular example where the correct icon is actually provided and the final size is instead broken?
Comment 9 Marco Martin 2016-10-31 16:38:23 UTC
another part of this problem, if i undesrtood correctly is that sometimes the icons provided are 24x24 pixels, so we should probably special case to try harder not to scale neither 22x22 nor 24x24 when the final size is near that
Comment 10 varlesh 2016-10-31 17:22:18 UTC
All GTK-apps and Electron-apps have blurred icon on tray. Qt - works fine and looks very good.
I don't know how this work. But GTK and Electron apps bad rendering on system tray.
For example compare tray icons on Unity DE and Plasma - Unity also use 22px icon size for tray.
For example Chrome icon on Unity:
http://1.bp.blogspot.com/-faUUDw7x9BU/Uw-t40ofgNI/AAAAAAAARio/oWD7j8gyaz0/s1600/chrome-unstable-35-aura.png

Skypeforlinux and Chrome on Plasma 5.8.2:
https://2.bp.blogspot.com/--j9LBvp-0L8/WBDZkkNX5lI/AAAAAAAAHTE/0k-_95zE8_QVSojboCMzTgwRyUASVJqWgCLcB/s1600/Screenshot_20161026_191432.png

You see - megasync (red icon), telegram (blue icon) - looks good. BUT chrome blurred and skypeforlinux it's ... hm i don't know waht is this.
Comment 11 Marco Martin 2016-10-31 17:29:27 UTC
in order to enable a systray icon for chrome, do i need a particualr extension?
Comment 12 varlesh 2016-10-31 17:57:09 UTC
It's native option use with libappindicator
Comment 13 varlesh 2016-10-31 19:44:43 UTC
Created attachment 101928 [details]
compare

Please confirm this bug! See compare (attached file)

- Chrome icon not 22px used on Plasma tray.

- Wire wrong rendering
Comment 14 Marco Martin 2016-10-31 20:12:37 UTC
moving out of needsinfo
Comment 15 varlesh 2016-10-31 22:34:02 UTC
Yes, on Wire use 24px icon size with wrong rendering. I found this file here:
/tmp/.org.chromium.Chromium.19Eulp/icons/hicolor/24x24/apps/chrome_app_indicator2_56fbeb943aa705baef524e3ce5519a28.png
And for Chrome too use 24px:
/tmp/.com.google.Chrome.n7Lp9s/icons/hicolor/24x24/apps/chrome_app_indicator2_7cc1675d0780c4c41cc111531efd7b28.png
Comment 16 varlesh 2017-08-25 03:43:36 UTC
Any news? Now Plasma 5.10.5 and this not fixed
Comment 17 Kai Uwe Broulik 2017-08-25 09:32:29 UTC
I tested it with one Electron app and can reproduce the issue, however, the icon it creates in /tmp/.org.chromium.Chromium.abcdef/icons is already cut off, no idea what Electron is doing here.
Comment 18 Mike Goodwin 2017-10-05 04:00:01 UTC
This has been an ongoing problem for quite some time.

Currently, on Fedora 25, 26, 27, The following apps that I use are affected causing my tray to look horrendous:

1. RocketChat+ - Electron
2. Riot - Electron
3. Wire - Electron
4. Keepass <- This one is NOT electron. (mono)

Please fix this.
Comment 19 varlesh 2017-10-17 19:22:12 UTC
Plasma 5.11.1 - it's not fixed :(
Comment 20 Petr Svoboda 2017-10-29 18:27:03 UTC
KDE Neon, Plasma 5.11.2 the bug is still there when using googleplaymusicdesktopplayer.
Comment 21 Jacobtey 2017-11-26 15:13:47 UTC
Hm, what kind of troubles does discourage plasma developers to fix this issue?
Comment 22 Zhanibek Adilbekov 2017-12-02 14:34:04 UTC
Plasma 5.11.4 -- not fixed =(
Comment 23 varlesh 2017-12-02 21:58:14 UTC
Icon good rendering if used Unity environment. For example:
XDG_CURRENT_DESKTOP=Unity wire-desktop
XDG_CURRENT_DESKTOP=Unity rocketchat

RESULT:
https://i.imgur.com/UXtJEDw.png
Comment 24 Kai Uwe Broulik 2018-01-05 11:13:26 UTC
This is a chromium bug. https://codereview.chromium.org/716253002
Comment 25 varlesh 2018-01-07 05:56:50 UTC
Committed:3 years, 1 month ago

It's libappindicator/systemtray bug, because non-Electron apps have wrong rendering too.

Run any application with libappindicator support and check this.
Comment 26 Sebastian Krzyszkowiak 2018-08-13 21:55:40 UTC
No, it's an issue with Chromium.

I've just sent a patchset there that fixes it: https://chromium-review.googlesource.com/c/chromium/src/+/1173235