Images in packages

Alex Merry kde at randomguy3.me.uk
Sun Jan 27 14:57:24 UTC 2013


Plasma::Svg's image search doesn't appear to be able to find images in a
plasmoid's package.

There is code in Plasma::SvgPrivate::createRenderer that should attempt
to find such an image, but (a) it is never called (because
Plasma::SvgPrivate::elementRect is called first, and sets themeFailed)
and (b) even if it were, it wouldn't work for QML applets where the
Plasma.Svg item doesn't have an Applet parent (or even ancestor).

Now, for a plain Plasma.Svg item in QML, you can just call
plasmoid.file("images", "something.svgz") explicitly, but if you are
using it via PlasmaCore.IconItem, trying to do the same results in some
odd scaling behaviour and an inability to use named SVG elements,
because IconItem ends up using KIcon internally, rather than Plasma.Svg
(because you passed in an explicit file).

Is there any (sensible) way to fix this?  Is this even intended to work?

Alex


More information about the Plasma-devel mailing list