This forum has been archived. All content is frozen. Please use KDE Discuss instead.

system tray icons

Tags: None
(comma "," separated)
begonia
Registered Member
Posts
149
Karma
0
OS

system tray icons

Thu Mar 24, 2016 11:48 am
this is how my system tray icons look on the desktop of my "kde neon" installation (plasma 5.6). (goes on below picture)

Image

Some time ago the icons in the system tray were even bigger. But I still find them too big. Why should they be allmost as big as the application launcher icons? Afer all: it's just the system tray....
Is there a way to customize the width of the system tray icons?
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: system tray icons

Thu Mar 24, 2016 4:15 pm
begonia wrote:
Is there a way to customize the width of the system tray icons?


Short: Edit /usr/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/code/Layout.js

Image

An example: Reduce icon size in vertical panel?? - https://www.kubuntuforums.net/showthrea ... post384036
begonia
Registered Member
Posts
149
Karma
0
OS

Re: system tray icons

Thu Mar 24, 2016 5:07 pm
Thank you so much!
I will look into that!
begonia
Registered Member
Posts
149
Karma
0
OS

Re: system tray icons

Thu Mar 24, 2016 7:32 pm
And it worked! Thank you. This took away the last real obstacle for using plasma 5 for me.

Great!

Image
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: system tray icons

Wed Jul 06, 2016 7:22 am
With the Plasma 5.7.0

'The System Tray has been rewritten from scratch': https://www.kde.org/announcements/plasma-5.7.0.php

To get two columns with a narrow panel the user can edit the spacing in /usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml

The default is 0.
Code: Select all
...
    //Main Layout
    Flow {
        id: tasksRow
        spacing: 0
        height: parent.height - (vertical ? expander.height : 0)
        width: parent.width  - (vertical ? 0 : expander.width)
...


At here, with the default and 'spacing: -8':

Image


Note !
Upgrades to the plasma will overwrote the main.qml edits.


A bug report of the tray icons: Bug 364431 - Tiny icons in 5.7 system tray - https://bugs.kde.org/show_bug.cgi?id=364431
apache
Registered Member
Posts
302
Karma
0
OS

Re: system tray icons

Wed Jul 06, 2016 3:13 pm
Is there a way to change system tray icon's colour?
I looked at
https://techbase.kde.org/Development/Tu ... emeDetails
and can't see an item that would define it.

With transparent panel theme and bright wallpaper colours system tray icons are barely visible. Example:
https://i.imgur.com/Ba75aYu.png
begonia
Registered Member
Posts
149
Karma
0
OS

Re: system tray icons

Wed Jul 06, 2016 3:26 pm
most icons in the system tray come from the plasma desktop theme you use.

That can be located in the folder ~/.local/share/plasma/desktoptheme (in your home-directory) or else the desktop themes are in the folder /usr/share/plasma/plasmatheme .
In such a theme there is a folder "icons". That is the place were the system tray gets is icons from.
If you would replace the not-so-good icons by better ones in that folder (from another plasma theme) and restart plasmashell it would be better
begonia
Registered Member
Posts
149
Karma
0
OS

Re: system tray icons

Wed Jul 06, 2016 5:32 pm
On my system (kde neon 5.7) I needed to do it like this:

Code: Select all
    ...
        //Main Layout
        Flow {
            id: tasksRow
            spacing: -3
            height: parent.height - (vertical ? expander.height : 0)
            width: parent.width  - (vertical ? 0 : expander.width)
    ...

"spacing: -3" did the trick.
This can be achieved from anywhere using the command line by giving in:
Code: Select all
sudo sed -i 's/spacing: 0/spacing: -3/' /usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml

After that restart plasmashell.
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: system tray icons

Fri Jul 08, 2016 10:36 am
A review request: Configuration option for System Tray's icon size - https://git.reviewboard.kde.org/r/128400/
Description

I didn't like the recent changes in systray icon size related to bug #364431, so I created this patch in order to make the systray's icon size user configurable


Good idea !
Hopefully it will be part of the Plasma 5 tray.

Image
jsalatas
Registered Member
Posts
64
Karma
2
OS

Re: system tray icons

Fri Jul 08, 2016 6:01 pm
Rog131 wrote:A review request: Configuration option for System Tray's icon size - https://git.reviewboard.kde.org/r/128400/
Description

I didn't like the recent changes in systray icon size related to bug #364431, so I created this patch in order to make the systray's icon size user configurable


Good idea !
Hopefully it will be part of the Plasma 5 tray.


I'm the one I made the review request. Unfortunately according to the usability team, the theme should control the icon size and not the user :(
User avatar
rwalker
Registered Member
Posts
44
Karma
0
OS

Re: system tray icons

Sat Jul 09, 2016 8:58 pm
jsalatas wrote:
Rog131 wrote:A review request: Configuration option for System Tray's icon size - https://git.reviewboard.kde.org/r/128400/
Description

I didn't like the recent changes in systray icon size related to bug #364431, so I created this patch in order to make the systray's icon size user configurable


Good idea !
Hopefully it will be part of the Plasma 5 tray.


I'm the one I made the review request. Unfortunately according to the usability team, the theme should control the icon size and not the user :(


I've got to keep repatching the qml (which keeps getting changed with each release!!) to get my desired (fixed) sized icons of 16x16 ... Plasma 5 is moving in the direction of Gnome Shell :-\
apache
Registered Member
Posts
302
Karma
0
OS

Re: system tray icons

Sun Jul 10, 2016 3:45 pm
How can I apply this patch. Does it need compiling something? What are the steps?
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: system tray icons

Sun Jul 10, 2016 7:14 pm
apache wrote:How can I apply this patch. Does it need compiling something? What are the steps?


One way to do it

Before you edit, BACKUP !

Downloading the patch 'systray_iconSize.patch' to the temporary directory.
Editing the systray_iconSize.patch: Replacing /applets/systemtray/package/ with the /org.kde.plasma.private.systemtray/

Image

Copying the org.kde.plasma.private.systemtray to the temporary directory.

Opening a Konsole in the temporary directory.

Applying the patch:
Code: Select all
patch -p1 -i systray_iconSize.patch


Image

Note !
The patch needs tuning if there are error messages - 'Hunk # FAILED at' - etc.

Copying the patched org.kde.plasma.private.systemtray to the right place.

Restarting the plasmashell.
apache
Registered Member
Posts
302
Karma
0
OS

Re: system tray icons

Mon Jul 11, 2016 11:11 am
Image
I get this. How to do "tuning"?
Code: Select all
patch -p1 -i systray_iconSize.patch
File org.kde.plasma.private.systemtray/ is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file org.kde.plasma.private.systemtray/.rej
File org.kde.plasma.private.systemtray/ is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file org.kde.plasma.private.systemtray/.rej
File org.kde.plasma.private.systemtray/ is not a regular file -- refusing to patch
2 out of 2 hunks ignored -- saving rejects to file org.kde.plasma.private.systemtray/.rej
File org.kde.plasma.private.systemtray/ is not a regular file -- refusing to patch
2 out of 2 hunks ignored -- saving rejects to file org.kde.plasma.private.systemtray/.rej
jsalatas
Registered Member
Posts
64
Karma
2
OS

Re: system tray icons

Mon Jul 11, 2016 3:43 pm
You don't need the patch. Just edit the file

/usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml

and change line 34 from

property int itemSize: Math.min(Math.min(width, height), units.iconSizes.medium)

to

property int itemSize: Math.min(Math.min(width, height), units.iconSizes.smallMedium)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]