Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tray icon in KDE5 doesn't have colorful border #2042

Closed
marmarek opened this issue May 30, 2016 · 35 comments
Closed

Tray icon in KDE5 doesn't have colorful border #2042

marmarek opened this issue May 30, 2016 · 35 comments
Labels
C: desktop-linux P: critical Priority: critical. Between "major" and "blocker" in severity. ux User experience

Comments

@marmarek
Copy link
Member

In KDE5, tray icon (especially NetworkManger Applet) doesn't have colorful border. It looks like KDE is trying to blend the icon into panel.
It is critical to have a way to distinguish icons from VMs.

@marmarek marmarek added bug C: desktop-linux P: critical Priority: critical. Between "major" and "blocker" in severity. ux User experience labels May 30, 2016
@marmarek marmarek added this to the Release 3.2 milestone May 30, 2016
@marmarek
Copy link
Member Author

Screenshot:
nm-applet-no-border

@marmarek
Copy link
Member Author

One idea is to abandon borders and color the whole icon, similar to icons used in the menu. Algorithm used for this coloring requires converting RGB to HSL, which seems to be not an easy task in C, but much easier in python (as it's done with app icons). And it looks to be quite easy to call python function from C.

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

After hours of debugging with @woju finally got it working :) IMHO looks nice, much better than unnoticeable border:
colorful-nm colorful-nm-connecting

Transparency is introduced by KDE - this is probably the same mechanism that stripped the border...
Should we enable it by default for every WM? Or only KDE? @rootkovska

@rootkovska
Copy link
Member

Can you disable it for KDE and paste here a screenshot?

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

Take a look above - there is nm-applet icon from sys-net (yes, should have red border, but it's stripped by KDE).

@rootkovska
Copy link
Member

No, I would like to see the icon with a white bg.

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

There is no white bg in KDE5 - it strips it out. Yes, what is actually visible in the tray in KDE5 is something preprocessed by KDE, not directly mapped VM icon.

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

And I can't see any configuration to disable this feature. Actually there is even no configuration for icon size (which is really annoying on HiDPI...)

@rootkovska
Copy link
Member

What if our magic HSL-based color converter also converted any of the white pixels into... sightly less white pixels, say RGB(254,254,254)?

@rootkovska
Copy link
Member

Currently it looks pretty ugly IMHO...

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

RGB(254, 254, 254) trick worked:
colorful-nm-white-bg

@rootkovska
Copy link
Member

... and if we also add back the frame in the VM color? :)

@rootkovska
Copy link
Member

Also adding @bnvk to get his opinion.

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

KDE strips the border, even if I made it thicker (2px).

@rootkovska
Copy link
Member

I see... Ok, let's try this:

  1. Revert back to the transparent bg,
  2. Tone down the Saturation (the S in HSL) at least by 50% (S /=2)
    ?

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

But when I made the frame separated 1px from actual border, it worked:
colorful-nm-white-bg-border
Now we've lost 2px from each side - one removed by KDE, the other one overwritten by our border.

@rootkovska
Copy link
Member

Looks better though :)

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

Transparent BG, reduced saturation:
colorful-nm-reduced-stauration1

@rootkovska
Copy link
Member

Not bad either :) IMHO

@rootkovska
Copy link
Member

And can you paste the screen with the nm-appet in a "connecting" state -- that looked worst on the screens above...

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

No idea why, but when I've restarted nm-applet, KDE cut off another pixel or two from each side of the icon... Maybe something about icon size - now icon window (somewhere hidden by KDE) is 16x16, but embedded in 32x32 KDE container. After restarting gui daemon, icon is back at the right size (32x32), but is not updating anymore... Anyway probably unrelated to the whole coloring stuff.
Here is a screenshot you've requested:
colorful-nm-connecting-reduced-stauration1
And the one in disconnected state (the red one is in problematic state of 16x16 size):
colorful-nm-reduced-stauration2

@rootkovska
Copy link
Member

I'm inclined towards the reduced-sat-on-transparent-bg version. Can you show how other icons would look this way? E.g. Electrum?

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

Electrum in blue VM:
colorful-electrum-blue
And red:
colorful-electrum-red

And the same with restored original saturation (and also added keepassx):
colorful-electrum-keepassx
Still - I see Electrum being indistinguishable.

@rootkovska
Copy link
Member

Not so good :/
And the version with "white-1" bg and frame around?

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

colorful-electrum-keepassx-white frame
Would you like reduced saturation too? IMHO this makes some icons harder to distinguish.

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

Cutting 2px from each side is especially visible on keepassx.

@rootkovska
Copy link
Member

palmface

@bnvk, help?

@marmarek
Copy link
Member Author

marmarek commented Jun 6, 2016

I've already introduced configuration parameter for this. We can make it all configurable and decide on the final version later.

There is still an option for bordered but not colored icon (useful for other WMs).

marmarek added a commit to marmarek/old-qubes-gui-daemon that referenced this issue Jun 7, 2016
marmarek added a commit to marmarek/old-qubes-gui-daemon that referenced this issue Jun 7, 2016
Restore "background" trayicon coloring and add an option to set the
mode.

QubesOS/qubes-issues#2042
marmarek added a commit to marmarek/old-qubes-gui-daemon that referenced this issue Jun 7, 2016
marmarek added a commit to marmarek/old-qubes-gui-daemon that referenced this issue Jun 7, 2016
marmarek added a commit to marmarek/old-qubes-gui-daemon that referenced this issue Jun 7, 2016
marmarek added a commit to marmarek/old-qubes-gui-daemon that referenced this issue Jun 7, 2016
Have it at least somehow working on KDE5 (where border1 is not
functional at all). Subject to a change in near future.

QubesOS/qubes-issues#2042
@marmarek marmarek reopened this Jun 7, 2016
@ParadiseBurn
Copy link

Might be just dumb newbie uestion here (ill be that idiot guy who cant read documentation) - Using 3.2 test iso, after launch I have no border or tray or anything outside of top left hidden icon for network config. Im sure theres a command to open the GUI, but what might that be? Im running everything through terminal now ( I know the version Im using is test/pre=release) just curious how I might activate to ease user expereince visually and for thos of us not as familiar with console.

@zander
Copy link

zander commented Jan 11, 2018

For what its worth;
the icon size is configurable and it is an "enum" to avoid HiDPI displays showing a 16 pixels icon.

The default is 16-pixels, scaled (looks just fine on a 230DPI screen I own, def not actually 16px).

You can change the default in a package quite trivially by patching (in dom0);
/usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/config/main.xml
under iconSize change the default to 2, for instance.

About the border, the simplest solution is to work with the KDE team, or at least the sources. KDEs plasma is mostly implemented using javascript (in qml style) which means you have the sources in dom0. Many useful things can be done without recompiling.

For instance the actual icon behaviour etc is defined in;
/usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml

Either way, I'd be interested in reopening the investigation towards a coloured outline as the current solution of colourising is not my favourite, I got the impression you guys didn't prefer that either ;)

@zander
Copy link

zander commented Jan 19, 2018

Interesting observation;

Adding a border to my applications icon, and showing it in my kde5 desktop had the following effect;

a) when running the app in dom0. This shows the border just fine.

b) When running in an appVM, this shows the colored image, without border.

I conclude that KDE does not remove any border added by Qubes, I don't know the full pipeline from appVM to kde-systemtray, would it be possible that the issue lies in one of the other components?

@marmarek
Copy link
Member Author

Icon handling is configured in /etc/qubes/guid.conf. Default is to color it, instead of adding border. Available options are in man qubes-guid, for reference:

   Available trayicon modes:
       bg:    color full icon background to the VM color

       border1:
              add 1px border at the icon edges

       border2:
              add 1px border 1px from the icon edges

       tint : tint icon to the VM color,

              can be used with additional modifiers (you can enable multiple of them)

       tint+border1,tint+border2:
              same as tint, but also add a border

       tint+saturation50:
              same as tint, but reduce icon saturation by 50%

       tint+whitehack:
              same as tint, but change white pixels (0xffffff) to almost-white (0xfefefe)

@andrewdavidwong
Copy link
Member

This issue is being closed because:

If anyone believes that this issue should be reopened, please let us know in a comment here.

@ninavizz
Copy link
Member

@marmarek I love that clipboard icon, in the screenshot towards the top. Why was it moved-away from?

@marmarek
Copy link
Member Author

It was completely different thing - a built-in KDE widget (we use Xfce now) managing I think local clipboard only (in case of qubes: dom0, which doesn't really have any content).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: desktop-linux P: critical Priority: critical. Between "major" and "blocker" in severity. ux User experience
Projects
None yet
Development

No branches or pull requests

6 participants