[PATCH] disable previews when icons are small
David Faure
faure at kde.org
Sun Jun 22 11:43:18 BST 2003
On Sunday 22 June 2003 09:17, David Hugh-Jones wrote:
> OK, I'm one of those bloody whingers on the usability
> mailing list who never actually write any code :-)
:)
> So this is my first toe in the water. It's a patch
> against HEAD which disables file previews when icon
> size is small. The theory is that nobody gains much
> from being able to see a tiny preview of a file. Tree
> views don't use previews, I assume for the same
> reason, so this also makes behaviour consistent.
Sounds good.
Hmm, although....... when you go to a directory containing 16x16 PNGs,
what's wrong with being able to see them as 16x16 icons in a "small icons"
view? I agree that it's kind of a special case though.
> (Hmm. Actually just discovered that tree views don't
> use previews even when icon size is huge. O... K...
> :-)
You know what to code next, then :)
> Anyway, comments welcome. This tiny patch took me 12
> hours of work - I am not used to KDE development or
> C++ development, and I don't have space to build a
> debugging version of kdebase. So please take some
> notice!
You don't really need a "debugging version" (as in --enable-debug)
for this stuff. kdDebug debugging is enabled even without --enable-debug,
and if you need to use gdb on a given app, use "adddebug" in the right
directory only.
> There is one bug, I am not sure if it is related to my
> changes:
> * enable "view settings saved in directory"
> * enable previews
> * move into a directory and start hitting the size up
> and size down buttons
>
> I find that previewed icons ignore my changes, except
> sometimes the first one. Somehow the thumbnails are
> not getting invalidated properly. This only happens
> when view settings are saved in directory - CORNER
> CASE HELL! Explanations would be gratefully received.
Huh. Dunno, needs debugging.
Now about your patch:
+// does this ever get called??
void KonqIconViewWidget::setThumbnailPixmap( KFileIVI * item, const QPixmap & pixmap )
Good catch - it doesn't seem to get called anymore.
I didn't do the last changes to this code, so maybe cc'ing kfm-devel would
be a good idea, never assume one developer knows it all ;)
If no reaction comes up on this, I'll just remove that method, there's no point
in keeping dead code (it confuses those who don't know the code, me included ;)
Comparing size with SizeSmall looks wrong to me - size could be 0,
which means "the default size for Desktop icons", otherwise it's a size
in pixels. See gridXValue() for instance.
I just saw the code at line 857, and it does look wrong too.
That method should calculate the real size like gridXValue does,
and then compare to SizeSmall.
--
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
Qtella users - stability patches at http://blackie.dk/~dfaure/qtella.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libkonq.diff
Type: text/x-diff
Size: 2086 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030622/065b0d41/attachment.diff>
-------------- next part --------------
_______________________________________________
kde-usability mailing list
kde-usability at mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-usability
More information about the kfm-devel
mailing list