Battery applet and KIcon

Marco Martin notmart at gmail.com
Sun Feb 14 20:27:09 CET 2010


On Sunday 14 February 2010, Aaron J. Seigo wrote:
> On February 14, 2010, Riccardo Iaconelli wrote:
> > Hello,
> > to follow up on a message i sent some time ago, I started to convert the
> > battery applet to make it use KIcon. =)
> 
> a) use reviewboard
> 
> b) since when have we abandoned scalable interfaces? ("nobody uses it
> larger than 64 pixels, and we will generate a 256px icon"; seriously?)
> 
> c) how does this allow one to ensure the battery matches the desktop theme?
> 
> d) if this is such a brilliant idea, why can't the pixmaps be put into the
> SVG file along with the freely scalable version?

I see the problems of both sides, because, with an icon
would be hard to change it depending on plasma theme
limited only for some sizes

however:
it is absolutely true that a svg rendered at a random size can look really bad 
when is not aligned at the pixel grid or it too detailed (or not enough) for 
the rendered size (in the end this is why true type fonts have that scary 
hinting language)

so what i propose is the following:
use the svg for the battery as now, -but-
if we are rendering at a certain size, and the element in the svg we want to 
render is "battery" search another one with the proper prefix, for instance 
"22-battery" before. it can be a svg, an embedded pixmap whatever (we should 
really understand what is the more efficient between the two probably)
if is found paint that, otherwise paint  the fallback general one.

we will need probably just a couple of really used sizes, probably 22x22 that 
is the (still fixed) systray icon size and a slightly larger, like 32x32?

for big "in the desktop" sizes an one and only free scaling svg probably would 
be just fine

Cheers
Marco Martin


More information about the Plasma-devel mailing list