Now Listen plasmoid

Alex Merry kde at randomguy3.me.uk
Thu Mar 21 12:25:28 UTC 2013


On 21/03/13 09:48, Aaron J. Seigo wrote:
> On Thursday, March 21, 2013 00:00:52 you wrote:
>> PlasmaCore.SvgItem {
>>    svg: Svg("nocover")
>> }
>
> yes, or Svg { source: "nocover" }

Does that really work?  When I did Svg { imagePath: "nocover" }, QML 
complained that Svg is not a type (it's a global function).

>> This seems to work, in that it finds content/images/nocover.svgz as
>> expected.  However, the effect is exactly the same as my original code,
>> which was
>>
>> PlasmaCore.SvgItem {
>>    svg: plasmoid.file("images/nocover.svgz")
>> }
>
> not really the same; this will never fallback to the theme

I meant that the effect in this instance (where the image is in the 
plasmoid) is the same.

> would it be acceptable to you if we had a images/themed/ directory where you
> could put such SVGs which would be the fallback to the theme?
>
> this would give us the following search path:
>
> $PLASMOID_PACKAGE/images/<name>
> $SYSTEM_SVG_THEME_PATH/<name>
> $PLASMOID_PACKAGE/images/themed<name>
>
> this could get tripped up if the file path is "themed/myimage.svg" but that
> seems like a stretch .. we could have a completely different directory, such as
> "theme/" ..
>
> hell, we could even go completely crazy and allow having per-theme SVGs in
> there even, e.g. a search path of:
>
> $PLASMOID_PACKAGE/images/<file>
> $SYSTEM_SVG_THEME_PATH/<file>
> $PLASMOID_PACKAGE/theme/$SYSTEM_SVG_THEME_NAME/<file>
> $PLASMOID_PACKAGE/theme/<file>
>
> thoughts?
>
> (this would all be very, very easy to add to ThemedSvg ..)

Any of these would be fine.  I think the separate directory approach 
would be safer, for the reason you mentioned.  I don't know whether 
anyone would really bother with the different theme files; it might be 
useful for some people, though.

Incidentally, if anyone feels the "jewel case" nocover image for the Now 
Playing plasmoid could be improved, do let me know.  I totally just 
stole it from Amarok, and I'm not sure a jewel case is really the right 
image to display there (especially as from 4.11 it will probably only be 
displayed when there is no media player; the media player logo is 
displayed when there is no album art).

Alex






More information about the Plasma-devel mailing list