[Semi-PATCH] Dolphin - Previews in Tooltips

Simon St James kdedevel at etotheipiplusone.com
Mon Aug 18 21:39:37 BST 2008


Hi Peter,

On Monday 18 August 2008 20:53:13 Peter Penz wrote:
> Hi Simon,
>
> [...]
>
> > > Do I miss here something (as said: I did not try your patch yet)?
> >
> > Ooh - if you've not tried it yet, I'd definitely better show you some
> > screenshots before committing as the results are quite ... um ...
> > space-consuming :). I've taken some representative shots: the ones with
> > the "-padded" suffix are using your suggestion of centering within a
> > constant-size square.  The only way I could think of doing this without
> > actually re-implementing the paint(...) and sizeHint(...) of
> > kformattedballoontipdelegate is to create a transparent PREVIEW_WIDTH x
> > PREVIEW_HEIGHT QPixmap and centre the image onto that, which is rather
> > clumsy :/
>
> Thanks a lot for the screenshots, now I understand. Yes, my suggestion does
> not work well with large preview sizes. Hmm...
>
> But also here I'd say: Please just commit your current version after
> Fredrik agreed. It's easier for me trying some things directly by having
> the code in SVN.
>

Hooray - committed! fredrik had this to say on IRC, BTW:

[21:21] <fredrikh> and i don't really have any objections to the rest of it, 
other than that thing i already mentioned
[21:21] <fredrikh> i think if you create a QIcon from a pixmap that's 128x128
[21:21] <fredrikh> and then call actualSize(QSize(32,32)) or whatever, it will 
returns 128x128
[21:22] <fredrikh> so i don't think it's necessary to mess with the 
decorationSize in the style options

so that looks like it might be any interesting approach to look into :)

BTW - I accidentally included the re-positioning patch I sent earlier: let me 
know if it causes any problems.

>
> > > I had already some working code a few commits earlier, but there have
> > > been issues with dual screen support and for 4.1 we used a simpler
> > > approach. I think it would be a good idea digging out the old code for
> > > this (svn commit 824927 in tooltipmanager.cpp) :-)
> >
> > Oh, that's a shame :( Unfortunately, I have no experience with or access
> > to dual screens - what were the issues, exactly?
>
> Issue https://bugs.kde.org/show_bug.cgi?id=167205 has a detailed
> description + history. If I remember correctly, it should be no big deal
> merging svn commit 824927 with 838041 (tooltipmanager.cpp). I can take over
> this task for you if you want to concentrate on the previews :-)

I'll give it a shot tomorrow evening :)

Best Wishes,
SImon






More information about the kfm-devel mailing list