[PATCH] scrollspeed konquerors smoothscrolling

Leo Savernik l.savernik at aon.at
Mon Aug 21 17:43:54 BST 2006


Am Samstag, 19. August 2006 18:13 schrieb Tom Albers:
> Hello,
[...]
> I'm not familiar with the "int i:4" syntax, so i simply removed the :4 part
> to allow a higher value then 8.

Then please make it int:4 -> short. I don't think 32k pixels/step is perceived 
as being too slow.
>
> -        if (adX > 100) d->m_mouseScroll_byX *= 7;
> -        else if (adX > 75) d->m_mouseScroll_byX *= 4;
> -        else if (adX > 50) d->m_mouseScroll_byX *= 2;
> -        else if (adX > 25) d->m_mouseScroll_byX *= 1;
> -        else d->m_mouseScroll_byX = 0;
> -
> -        if (adY > 100) d->m_mouseScroll_byY *= 7;
> -        else if (adY > 75) d->m_mouseScroll_byY *= 4;
> -        else if (adY > 50) d->m_mouseScroll_byY *= 2;
> -        else if (adY > 25) d->m_mouseScroll_byY *= 1;
> -        else d->m_mouseScroll_byY = 0;
> +        d->m_mouseScroll_byX *= (int)(adX*0.2);
> +        d->m_mouseScroll_byY *= (int)(adY*0.2);

Hmm, this looks rather volatile when moving the mouse sideways. Usually, you 
want to speed up up/down navigation, but if you don't pay close attention and 
also move the mouse more than +-5 pixels sideways, you'll also shift the 
viewport horizontally. I think you should add some amount of tolerance before 
the second direction can influence the first one.

Otherwise, this patch seems to introduce "more expected" behaviour and should 
be considered for inclusion.

mfg
	Leo




More information about the kfm-devel mailing list