Review request: Container plasma applet

Marco Martin notmart at
Sun Sep 27 23:58:56 CEST 2009

On Sunday 27 September 2009, Sebastian Kügler wrote:
> On Sunday 27 September 2009 15:01:42 Riccardo Iaconelli wrote:
> > On Thursday 24 September 2009 19:22:57 Aaron J. Seigo wrote:
> > > how is this any different other than the SVG being pre-rendered vs
> > > rendered at  runtime? how would we provide for nice sizing? and how
> > > would the animations that exist currently be implemented, such as the
> > > power indicator zoom in? theme appropriateness?
> >
> > Well, the pre-rendered png has pixel perfectionness and a number of other
> > retouches. Just for the most evident detail, if you look at the real pngs
> >  you can see that the battery bg of the rendered svg is much more blurry
> >  than what's intented to be.[1]
> The problem might be that the battery.svg has not been touched by an artist
> in two years. I've hacked an icon's SVG from loooong ago into the
> battery.svg theme. I'm bad at Inkscape today, and I certainly had any
> concept of pixel alignment that time. :/ This is only part of the issue
> (bad graphics used), the other part is shortcomings in Qt and SVG sizing
> for smaller pixel sizes.
> >  then you have right effects applied like
> >  icon colorizing (try to make all your icons pink and you'll know what i
> >  mean) which nowadays breaks for the "standard" panel just for the
> > battery. current animation is also somewhat... not very professional, at
> > least in my humble opinion, i think that fading in and out the flashlight
> > would look just so much better.
> That's a one or two line change.
> >  and i don't think it's a showstopper anyways.
> > theme appropriateness then isn't really a problem too, no other icon on
> > the panel infact respects it, and i think they do the right thing here.
> I don't. I'd *love* to see a monochrome system tray, that's hard to do
> right now, except for the battery plasmoid because it's using plasma's
> theme support. The battery applet supports that currently without any code
> changes.
> > infact
> >  i think it's a bad idea to make the theme able to change these icons,
> >  after all to the user they're all "system" icons, icons like systray
> >  icons, or the menu or the device notifier. as such we have two
> >  possibilities:
> >
> > a) make the plasma theme theme all the icons, including systray and menu
> > b) leave that up to the icon theme
> You're still thinking of the system tray as an icon parade. ;-)
> Having things like the battery in the system tray as an icon, but I would
> rather not have this limit the rendering of it to just the sizes
> KIconLoader supports. From a theming point of view, themers can currently
> just grab the battery.svg and change it.
> Also, using KIcon would mean that we need 120 different icons (10*2 states,
> 6 sizes), that sounds like an awful lot of disk I/O and clutter to me.
> > a is not really feasible though, not only because we give a lot more
> > images to do to theme creator, but then we lose the ability to do cool
> > effects (blur) because of the crappy svg renderer. even if we do embed
> > pngs, we loose the ability of having multiple sizes pngs, discarding all
> > the work done on small size icons. that only leaves b as an option.
> >
> > to conclude, because of the svg it behaves differently from all other
> >  "default panel buttons", looks worse, and in the end it only gives a
> > sense of inconsistency to the user. that's why i feel it should be a
> > kicon.
> >
> > > isn't the problem really that it doesn't draw the SVG with proper sizes
> > >  all  the time? i think the painting of the widget could be re-written
> > > with today's Plasma and Qt stuff much cleaner and resolve the
> > > outstanding issues.
> What would those changes be?
> > As I explained above, it's really not that. :-) It's borders, grid
> >  alignment, and other style issues.
> Some of those can really be fixed in the SVG file, can you have a look at
> that?
> To summarize a bit what we have right now:
> - pixel alignment
> - Qt SVG rendering issues
> - bad quality of battery.svg
> + animations
> + theming (monochrome / color, at least)
> + 'just one theme file'

to summarize, here there are 3 problems:
i don't think good pixel alignment could be reached using just svg, no matter 
how good the renderer is (unless we will have someday something as crazy as 
the truetype hinting language, something that i don't see in the near future, 
not even desiderable, probably), oxygen icons are mostly redrawn from scratch 
or at least adapted for different resolutions, because they're different 
beasts and shapes have to be quite different (hopefully when we'll have 300+ 
dpi monitors the problem will solve itself :D).

however, with svg we can have an image that can look good at a certain size 
(the default systray size?) and its multiples, and could be good enough (now 
the battery svg is not that bad, the only reall bad bit is the little lighting 
that signales ac plugged in, but that's fixable).
if it will still use svg, just one thing is important to do: now resizing the 
battery it gets stretched in funny ways. it should retain its aspect ratio and 
be painted in the largest proportioned rect contained in the applet contents 
rect. should be quite a small patch.

last thing, monocrome systray:
since it's really simple probably svgs are enough in this case too, for 
plasmoids would be a bit tricky, because they should have to detect if they 
are in the systray and change their svg accordingly.
for the new systray protocol icons, if they use icon names as opposed to 
pixmaps it is ridicolously easy: just find that name in the plasma theme, if 
not found use kicon as usual, for old icons, well, another reason to port it 

Marco Martin

More information about the Plasma-devel mailing list