Google-play-music-desktop-player-unofficial-: KDE + HiDPI: Wrong tray icon scale

Created on 18 Dec 2016  路  27Comments  路  Source: MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

OS: Kubuntu 16.10

Issue Descriptions: Scale of tray icon is off, it's way too big and cropped

Steps to Reproduce: Install GPMDP on Kubuntu, set Scale factor to 2 in Kubuntu Display settings.
screenshot_20161218_154542

olinux statuhelp-wanted

Most helpful comment

As others have pointed out, this actually seems to be a Chromium/Electron issue. I see it with Keybase too, which is also an Electron app.

Thanks to the Papirus theme page on Github, I found a workaround. Preface the command with XDG_CURRENT_DESKTOP=Unity when running GPMDP. I edited my .desktop file (via the KDE _Edit Applications_ menu option) so that the command looks like this:

XDG_CURRENT_DESKTOP=Unity google-play-music-desktop-player

With that, my icon is fixed.

All 27 comments

This happens to me with Scale factor at 1 as well.

@OOPMan thanks for update, as I haven't tested it with unscaled desktop.

IMO this is partly Chromium's fault and partly Kubuntu's fault.

Chromium due to the strange way they set tray icons and Kubuntu's for not doing what literally every other OS in the world does and scale the icon themselves.

I'll accept a PR to fix this but bearing in mind people have tried many times setting up a system of tray icons that works on every platform is quite tricky.

Oh well. I don't really mind clicking on a funny icon, since I know the only funny icon is Play :-)

Same problem on KDE neon. However Neon is practically identical to Kubuntu at this point.

I'm having the same issue, KDE Plasman 5.9.4 Arch Linux 64bit. The tray looks exactly like z0rc posted.

I too would love to see this icon fixed:), it looks horrible, I'm not on HiDPI either...

Agrees, problem is exists on KDE Neon Developers Edition as well.

Chiming in to say that on one KDE desktop (Arch) I have this issue, but not on another.

Similar thing happening to me as well.
Fedora 26/Gnome 3.24.3. Screen resolution: 3200x1800, scale factor: 2
image

UPD: I'm using Top Icons plus with slightly increased icons size. Anyways, in default gnome tray it looks like this:
image

Hmm I notice slack is handling it fine. I wonder what they are doing differently.

Also seeing this on KDE Plasma 5.8 on Debian unstable. Screen resolution is 1920x1080, no scaling. Slack's icon looks a little weird (looks like it might be getting a little cut off) but I can clearly see it is Slack, unlike GMDP.

KDE deb/Ubuntu/mint is doing the scaling issue on my 1366x768 laptop panel, so not just hidpi

I fixed this on my system. Here's what I did:
Install the Papirus theme.
Install Hardcode-Tray.
Do:
sudo hardcode-tray --theme Papirus-Light -o gpmdp

Start/Restart GPMDP. You can mess around with Papirus-Dark or other variants until you find the perfect icon for your desktop.

@yochaigal Thanks, working perfectly :-)

Seems to have been fixed in Plasma 5.11.3 (on Arch), at least on a non-HiDPI display.

As others have pointed out, this actually seems to be a Chromium/Electron issue. I see it with Keybase too, which is also an Electron app.

Thanks to the Papirus theme page on Github, I found a workaround. Preface the command with XDG_CURRENT_DESKTOP=Unity when running GPMDP. I edited my .desktop file (via the KDE _Edit Applications_ menu option) so that the command looks like this:

XDG_CURRENT_DESKTOP=Unity google-play-music-desktop-player

With that, my icon is fixed.

Closing as stale/possibly fixed. If anyone has any further issues feel free to leave a comment and we'll look into it again.

Workaround with XDG_CURRENT_DESKTOP=Unity helps, but without it the issue is still present on KDE.

Yep, I still have the issue, it's just hidden with the workaround.

As a last resort I suggest to start second instance of GPMDP with that variable already set if confirmed that it's KDE.

On Manjaro I solve this problem by resize image files
- slack-taskbar-rest.png
- slack-taskbar-highlight.png
- slack-taskbar-unread.png
in folder /usr/lib/slack/resources/app.asar.unpacked/src/static/
Goog size is 24x24 px
Origin size was 64x64 px

On LinuxMint I solve this problem by adding
env XDG_CURRENT_DESKTOP=Unity
variable to Exec section in /usr/share/applications/salck.desktop file

image

The error is still present. KDE Neon unstable. Workaround with XDG_CURRENT_DESKTOP = Unity helps.

with workaround:
image
Without
image

A bit later can check on kubuntu 18.04

I fixed this on my system. Here's what I did:
Install the Papirus theme.
Install Hardcode-Tray.
Do:
sudo hardcode-tray --theme Papirus-Light -o gpmdp

Start/Restart GPMDP. You can mess around with Papirus-Dark or other variants until you find the perfect icon for your desktop.

Just wanted to point out a couple minor details regarding the suggested invocation for hardcode-tray. Personally, I would use the following arguments instead:

sudo -E hardcode-tray -ct RSVGConvert -dt Papirus-Dark -lt Papirus-Light -o gpmdp

The reasoning behind those specific command arguments being:

  • sudo -E provides elevated privileges while retaining the original user's environment variables, which the hardcode-tray script uses to refine its course of action depending on which desktop environment is in use and its current scaling factor
  • RSVGConvert (librsvg) is the most reliable of the possible conversion backends that hardcode-tray makes use of and the one that the Papirus Team explicitly suggests manually selecting for this use case. I believe it has to do with its handling of their use of CSS to determine the light/dark/elementary variants of all their icons
  • Setting the dark and light theme variants simultaneously leaves you with installed versions for each from a single command and safeguards against a theme or palette change down the road that sets you back at square one, potentially needing to go search for the solution again
  • An optional command argument which could prove useful is -s 22 (alternatively -s 16 or -s 24) if you've changed the default panel icon size for your DE and the script isn't giving you precisely the right size. Also some icons with a lot of negative space that look slightly undersized at 22px will look marvelous at 24px
  • The -o gpmdp can also be thought of as optional as without it the script will work its magic on any other troublesome apps that it finds are not playing nicely with the panel of your DE, not solely Google Play Music Desktop Player
Was this page helpful?
0 / 5 - 0 ratings

Related issues

amgrider picture amgrider  路  3Comments

damiong28 picture damiong28  路  3Comments

timp3289 picture timp3289  路  3Comments

PazerOP picture PazerOP  路  4Comments

St0rmwindX picture St0rmwindX  路  3Comments