[PATCH] Fifteen puzzle sizing change (and other fixes)
Aaron J. Seigo
aseigo at kde.org
Mon Sep 15 20:44:24 CEST 2008
On Monday 15 September 2008, Anthony Bryant wrote:
> 2008/9/15 Aaron J. Seigo <aseigo at kde.org>
>
> > On Monday 15 September 2008, Anthony Bryant wrote:
> > > I found another bug in the puzzle: double (or triple) clicking on a
> > > piece
> >
> > ok, the patch is now committed; i also went through and made the "split
> > pixmap" version use an svg instead of a bitmap. now you can create an svg
> > where each tile has the id of piece_# where # is 0..15 and it works. you
> > can
> > even put the image in the theme, though right now the configuration
> > dialog doesn't particular honor that. this meant i could get rid of all
> > the pixmaps
> > hanging about.
>
> Thanks for committing it =) There are a few things I noticed about your
> changes though...
> The most noticable one is that you can no longer use jpegs or other bitmaps
> as the basis for the split image.
you can put bitmaps into an svg file.
> I'm not sure what the original intentions
> for this feature were, and I can see that allowing split svg could be
> useful, but I would have thought that most people would expect to be able
> to split up any image (e.g. photos), and not just specially crafted svgs.
this is an issue we've come across elsewhere as well in the past. i don't
think that supporting pixmap files and SVG files makes sense, however. i do
think that being able to take a pixmap file as an input and write out an svg
down, however.
note that currently if one uses a custom image and then removes that image
from disk, the puzzle will stop using it. that's a little unfortunate; and
again an issue we've run into elswhere (e.g. wallpapers)
> Apart from this there's only one slight problem - the svg doesn't get set
> back to the original one if you set it to use a custom image and then go
> back to identical.
hm.. this is actually a flaw in the configuration of that the plasmoid.
what if i want to use a different image with identical pieces? can't.
what really ought to happen imho is the user should be able to click a
checkbox that says "use custom image" and then select one from file dialog.
identical pieces can be autodetected by looking for an object with id piece_0
as a hint, as it already does in my last patch, which is another benefit of
using SVG.
that would leave us only with numerals required. that too could be embedded in
the svg as a hint, meaning that the only configuration item would be whether or
not to use a custom image and if so what image to use.
creating an svg document by slicing up a bitmap would solve the SVG authoring
obstacle, and is something we could re-use elsewhere as well.
in any case, i've put a fix for the current configuration setup and removed yet
another unecessary method from fifteen.cpp
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080915/16007985/attachment.sig
More information about the Plasma-devel
mailing list