Currently, icons for Plasma 5 widgets must be specified either as an absolute path or as a name of a system theme icon. When delivering Plasma 5 widget through the store.kde.org, there is no way how to specify custom icon because absolute path is different for each user (/home/myuser/.local/share/plasma/plasmoids/my.widget.name). It would be great if the widget icon would be search also in the widget directory. For example if I specify "icon=icons/myicon.svgz" in the metadata.desktop, the icon in "icons/myicon.svgz" in the widget directory would be used.
which icon do you mean?
I mean the icon which is shown in the "Widgets" slide out panel after I click on the "Add widgets". The icon which is normally indicated by the "icon=..." in the metadata.desktop file. The "icon=..." value can be either an icon name in which case the system icon is used (/usr/share/icons/<theme>/<category>/<size>/<icon>.svg) OR it can be an absolute path. If the widget was installed into the user home directory, it's not possible to define correct absolute path in the metadata.desktop file (which is distributed with the widget) because each user has different path (/home/<user>/.local/share/plasma/plasmoids/<widget>/<icon>.png). This is why I suggest to search for the icon in the widget directory first before trying to search for the icon in the system theme.
Marco and/or Kai isn't there an undocumented way to do this? I recall one of you helping Scott Harvey with this a while back.
screenshot.png in the package root dir.
Well there you have it. :)