D6392: [Panel Config] Scrolling over size button increments size by 1 and shows current thickness
Chris Holland
noreply at phabricator.kde.org
Wed Jan 3 18:10:05 UTC 2018
Zren added inline comments.
INLINE COMMENTS
> broulik wrote in SizeHandle.qml:123
> I don't know exactly how `MouseEventListener` behaves but in `MouseArea` you get a ton of `onWheel` events for touchpads (which scroll pixel-precisely), potentially causing you to making your panel enormous accidentally
Recently got a Windows Vista era HP laptop running KDE.
I see, the touchpad "mousewheel" sends a ton of events with `wheel.delta` from ±9 to ±60.
In my test, I actually noticed the opposite effect (it was slow to resize) since we do `Math.round(wheel.delta / 120)` which can turn into `Math.round(30 / 120) = 0`. So events with a `wheel.delta` smaller than 60 were ignored.
Anyways, I always wondered why plasma-pa did this in their mousewheel code:
https://github.com/KDE/plasma-pa/blob/master/applet/contents/ui/main.qml#L197-L210
Should be an easy fix. Just need to add a `wheelDelta` variable and ignore events when it's `wheelDelta <= -120 || 120 <= wheelDelta`.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D6392
To: Zren, #plasma
Cc: davidedmundson, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180103/88ab91b4/attachment.html>
More information about the Plasma-devel
mailing list