Better behaved previews

Peter Penz peter.penz at
Sat Jan 19 17:41:24 GMT 2008

Hi Rafael,

On Saturday, 19. January 2008 18:25:09 Rafael Fernández López wrote:
> On Saturday 19 January 2008 17:47:17, Peter Penz wrote:
> > Hi Rafael,
> >
> > I'm not sure whether you've read my reply/concerns to your previous
> > changes of kdiroperator (see attached mail), I've got no answer yet :-(
> Oh I don't check the @gmail account anymore... didn't see it, sorry.

No problem :-) I should have used your kde-address -> my fault

> > I've just tried your new patch, but it still contains the performance
> > regression by generating a preview on each hovering. Beside the
> > performance regression there is also a usability regression: it is not
> > possible anymore to hover an item and reach the "OK" button without
> > generating a preview from another accidently hovered item.
> The performance regression should have gone away. Try the latest please. :)

I just tried [TAKE 2]: the performance issue is still there - if I read the 
code correctly you create a preview on each hover action. With the old 
version of kdiroperator a preview has only be generated if the user stays 300 
ms on the same item. This 300 ms delay solved two problems:

- No performance problem when moving the mouse above some items in a fast way. 
There is no need creating a preview for an item that is temporary hovered for 
50 ms ;-)

- When moving the mouse from an item where the preview is shown to e. g. the 
OK button, the preview of other items won't be accidently triggered.

To make the whole thread shorter and to prevent a long discussion - I think 
the benefits of both approaches can be combined:

- I'm fine with your modifications regarding selection + hovering. I missed 
that the file-dialog has a little bit different usecase as Dolphin in this 
regard. You got it right :-)

- If your patch could be improved by the 300 ms delay, then I'd be very happy 
(this would solve the performance issue + would prevent accidental previews). 
I've explained the approach at the end of the mail [1].

To avoid spamming core-devel we can also discuss further privately and post 
the result here later.


- when hovering an item start a 300 ms timer
- if another item is hovered before the timer is exceeded, restart the timer
- if the timer is exceeded, create the preview

More information about the kde-core-devel mailing list