Protecting against accidental Ctrl+wheel zooming (was Re: Ctrl+wheel zooming (was: font size in "documentation" tool view))

Francis Herne mail at flherne.uk
Thu Jan 5 09:20:56 UTC 2017


On Thu, 05 Jan 2017 10:13:31 +0100
René J.V. Bertin <rjvbertin at gmail.com> wrote:

As your original (quoted) mail suggests, the logical place for this
code would be in Qt.

Ctrl-scrolling doesn't only affect KDevelop, or KTextEditor - you
already mentioned Konsole, and I expect a large proportion of Qt
applications are affected.

-Francis

> Hi,
> 
> I was reminded of this thread from last summer. I don't think it went
> anywhere or any decision were made (and Igor's RR is still open).
> 
> And I still get hit quite regularly by unwanted text zooming after I
> used 2-finger scrolling with inertia (something I find really useful)
> and then want to use a shortcut forgetting to wait until scrolling
> really stopped. Every that happens I have to retrieve my normal
> setting through trial and error because KDevelop doesn't have a 100%
> zoom shortcut.
> 
> Here's the code I worked on with Thomas:
> https://github.com/RJVB/qtwheeltest Would it be a lot of work to
> incorporate the active principle in KDevelop or would have to go into
> KTextEditor? The PoC implementation also makes it possible to prefer
> accelerated scrolling over scroll-zooming, something that may be of
> more use in an IDE?
> 
> Thanks,
> René
> 
> >Since Ctrl+MouseWheel zooming came up, here's a gripe I have with
> >that feature.
> >
> >Scroll wheel events are also generated when using a trackpad's
> >2-finger scroll (and presumably, hscroll and vscroll borders). If
> >inertial scrolling is used/enabled/provided you get scroll wheel
> >events during coasting, i.e. when the user is no longer scrolling
> >actively ... and they may keep coming in when visible scrolling has
> >stopped already. It happens often to me that I scrolled a bit of
> >code and then want to use a keyboard shortcut, and that my text
> >starts zooming instead. Even with a shortcut to get back to 100%
> >that is quite annoying - enough that Qt actually has some filters in
> >place to prevent it from happening on OS X, and that some
> >applications (like Konsole) make the feature optional.
> >
> >I've done some preliminary work together with Thomas Lübking last
> >year, to add a form of hysteresis to the event handling which
> >prevents zooming when the Ctrl key is pressed while scroll events
> >are still coming in. Worked quite nicely but we never got around to
> >submitting it to Qt, for some reason.
> >
> >Before anyone suggests it: I find inertial scrolling very useful
> >when you don't have something like a trackball with actual inertia,
> >and a large screen (or long documents). I wouldn't want to have to
> >chose between it and scroll-wheel zooming; I'd rather lose the
> >latter (and just use Ctrl-+ and Ctrl--). KDE4 had a global setting
> >for that, which sadly didn't make it into KF5.
> >
> >R.  
> 



More information about the KDevelop-devel mailing list