> On Sept. 2, 2015, 3:06 p.m., Dominik Haumann wrote:
> > Since this is a mac issue, what about this:
> > 
> >     if (e->modifiers() == Qt::ControlModifier
> >     #ifdef Q_OS_MAC
> >         && KGlobalSettings::wheelMouseZooms()
> >     #endif
> >     ) { // ...
> > 
> > That way we at least do not touch the current 4.x code for Linux (which 
> > works fine, as I understand), and the workaraound is ok for os X...
> > 
> > Would that be ok?

that would be an option, but if you understood that Kate on Linux (X11/xcb) is 
not affected by this issue, you misunderstood something. If I do not run into 
it there that's mostly because of different scrolling settings, trackpad 
characteristics and above all, the fact that I rarely use Kate or KDevelop 
there.


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120319/#review84760
-----------------------------------------------------------


On Sept. 22, 2014, 5:16 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120319/
> -----------------------------------------------------------
> 
> (Updated Sept. 22, 2014, 5:16 p.m.)
> 
> 
> Review request for Kate, KDE Software on Mac OS X and kdelibs.
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> KDE has a global text editor option that can be used to let Ctrl-MouseWheel 
> events zoom the text font being used. Kate does not respect this setting, 
> which is an omission that can lead to unexpected behaviour.
> 
> On OS X, the feature works slightly differently in the sense that 
> `Qt::ControlModifier` does not designate the control key, but the command (?, 
> Apple) key. In addition, Qt's event handling does not appear to be able to 
> distinguish between scrolling under direct control, and residual scroll 
> movement that's due to simulated inertia. As a result, any attempt to use a 
> keyboard shortcut while a text view has not stopped moving completely will 
> lead to text zooming.
> See https://bugreports.qt-project.org/browse/QTBUG-41475 .
> 
> At first I thought to replace `Qt::ControlModifier` with `Qt::MetaModifier` 
> on OS X but that would probably require changes in many locations, and thus 
> best be preceded by a design decision if the standard shortcut modifier key 
> ought not be referenced via a symbolic platform constant not named after a 
> specific key, instead of being hardcoded (and using a key name).
> 
> Therefore, I present a small patch that checks 
> `KGlobalSettings::wheelMouseZooms()` when the platform's `ControlModifier` is 
> held and a wheel event received.
> 
> An alternative solution could introduce a Kate-specific setting (just like 
> Konsole has one), but that would require far more changes.
> 
> 
> Diffs
> -----
> 
>   part/view/kateviewinternal.cpp a2906f3 
> 
> Diff: https://git.reviewboard.kde.org/r/120319/diff/
> 
> 
> Testing
> -------
> 
> On OS X against kdelibs 4.14.1 (git/kde4). The change consists of an 
> additional call to a standard kdelibs function which I do not expect to 
> introduce regressions on any platform.
> 
> I looked at kate's git/master code, which lacks a `wheelEvent` handler 
> suggesting the feature works differently there. However, Qt 5.3.1 
> applications (like Digia's own Qt Creator) still suffer from the phenomenon 
> described above, so a fix would be beneficial for KF5 too)
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

Reply via email to