Control for scrolling
Carsten Pfeiffer
carpdjih at mailbox.tu-berlin.de
Fri Dec 12 13:03:08 GMT 2003
On Thursday 11 December 2003 18:38, Aaron Seigo wrote:
> QListView, QListBox, QIconView, etc support BOTH Shift and Control as
> fast-scrolling modifiers. they swing both ways, so to speak. ;-) it's
> really
a matter of which one to steal for zooming needs. QTextEdit and
> KView have chosen Control, and that makes sense.
Oh, that's news to me!
> As for KTextEdit, here's the appropriate code:
>
>
> void KTextEdit::contentsWheelEvent( QWheelEvent *e )
> {
> if ( KGlobalSettings::wheelMouseZooms() )
> QTextEdit::contentsWheelEvent( e );
> else // thanks, we don't want to zoom, so skip QTextEdit's impl.
> QScrollView::contentsWheelEvent( e );
> }
>
> so if we do scroll with the mouse wheel, we use QTextEdit's wheel event
> handler. and that means Control to zoom.
Hmm, maybe I misunderstand you, but the above code makes it zoom if Ctrl-wheel
is configured to zoom and fast-scroll otherwise.
> just noticed that OOo also uses Ctrl for zooming, if that matters any =)
Right. If it would only support fast-scrolling with Shift though :) I'm fine
with using Shift then.
Cheers
Carsten Pfeiffer
More information about the kde-core-devel
mailing list