Registered Member
|
I tried to make my plasmoid icon change depending on the theme, like described here: http://notmart.org/blog/2016/02/plasma- ... -you-like/
I cannot get it to work, however. It keeps displaying the color set in the file (which is red so I notice it). I have the following qml (simplified somewhat):
Note that the code works if I use an already exiting icon, like 'kmail'. The icon is installed to /usr/local/icons/hicolor/scalable/apps/tijink-todo.svgz, and its decompressed content is
Can somebody see what the problem is and help me fix it? I tried various thing already (like moving the icon to plasma/desktoptheme/default/icons), but might have done something wrong in the process. |
Registered Member
|
I solved the problem! There were two issues with my icon: its name should not contain dashes and it should be installed to /usr/share/plasma/desktopstyle/default/icons (or similar, if your distribution uses different paths).
Besides that, I discovered how to pack multiple icons in one file: if your svg file contains multiple groups, each with an id like "{filename}-{subicon}", you can simply set a qml icon to that id and it works. If you do that, note that plasma computes the bounding box of your subicon, so add an invisible rect to maintain the correct size. Example for my icon:
|
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]