Using Plasma::Svg outside of Plasma

Aaron J. Seigo aseigo at kde.org
Sun Nov 28 12:08:12 CET 2010


On Sunday, November 28, 2010, Manuel Mommertz wrote:
> I looked a bit deeper in the code and there are some more things that need
> a bit of work in my eyes:
> 
> Currently Plasma::Theme::styleSheet takes its colors always from
> defaultTheme instead of the Theme it is called from. This is very easy to
> fix.

yes, i noticed that as well.

looking at some of the new code in Svg and Theme, it's probably time to do 
some more profiling of Svg as well as make sure the caching is working 
properly (e.g. no renderers created on a second run of the app)

> If a Plasma::Svg is not themed it stores its pixmaps in the cache of
> defaultTheme. For this, it would be a better solution to have a generic
> systemTheme or something like that, as there is no need to rerender this,
> if the default theme changes. Beside this, there is really no logical
> relation between an unthemed svg and the default plasma theme.

this isn't fatal, and if the occurance of theme changes is nominal then the 
overhead of another cache file is probably not worth it. if the themes were 
going to be changing several times each session and there were significant 
numbers of unthemed SVGs, then it might be worth thinking about. and since it 
is an entirely internal detail, the policy for this can change if we find it 
is an actual issue.
 
> To conclude: I still think that a generic Plasma::Theme would be the best
> way to solve this issues. 

i disagree; such a theme would just be a way to work around non-themed SVGs. 
which is an oxymoron. it also means applications would need to remember to set 
the theme correctly for a given svg and we can do that a lot simpler for them.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20101128/3c5f59c2/attachment.sig 


More information about the Plasma-devel mailing list