On Wednesday 03 September 2008, Anthony Bryant wrote: > Hi, I've been using KDE from trunk for a while now, and I thought I would > try to fix a few bugs I noticed in the fifteen puzzle applet (and also add > a few new features) as my first contribution, if someone would be kind > enough to look over and possibly commit it.
at first read, it looks good; i haven't tested it yet, however, just read through the patch. my only concern with the scaling of the pieces is that, because they are pixmaps, they will look increasingly uglier as they get bigger. a proper solution here would be to use an svg file instead and then render that to the right size. this should be very easy with Plasma::Svg to actually do all the painting. pixmap support should be simply dropped imho. now.. in Fifteen::setIdentical() it does render using an svg. great =) it doesn't use Plasma::Svg, but thats easy to change if needed. what's really bizarre is that it render the svg at its natural size and then scales it down in updatePixmaps. really, it probably should just render the svg file into the right size of tile right in updatePixmaps. this would simplify things a bit, as setIdentical could take a boolean, and setSplitPixmap could become a setter for the svg file path. hmm.. looking at it further, it would probably make even more sense to have one Plasma::Svg shared amongst all the pieces, have a flag for identical or not (and if not, use elementIDs in the svg to determine which block is which), and let Plasma::Svg do all the caching for you. as long as you don't change the svg file, the type of file (SingleImage vs ImageSet) or the size painting with Plasma::Svg is the same as painting a pixmap ... -- 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 Trolltech
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel