delayer for tasks wheel events

-- touchpads and fast wheel scrolling for
tasks was creating an unpredicted effect
from user point view. The solution was
already tested from audio badges, applets
wheel activation but hadnt got into
for Tasks.

BUG: 396737
FIXED-IN: 0.8.1
v0.8
Michail Vourlakos 7 years ago
parent 77fbd306cb
commit 0bee41c9a7

@ -88,6 +88,7 @@ MouseArea{
// hoverEnabled: false
//opacity : isSeparator && (hiddenSpacerLeft.neighbourSeparator || hiddenSpacerRight.neighbourSeparator) ? 0 : 1
property bool blockWheel: false
property bool buffersAreReady: false
property bool delayingRemove: ListView.delayRemove
property bool scalesUpdatedOnce: false
@ -863,13 +864,16 @@ MouseArea{
}
onWheel: {
if (isSeparator || !root.mouseWheelActions || inWheelAction || inBouncingAnimation
if (isSeparator || !root.mouseWheelActions || blockWheel || inWheelAction || inBouncingAnimation
|| (latteDock && (latteDock.dockIsHidden || latteDock.inSlidingIn || latteDock.inSlidingOut))){
return;
}
var angle = wheel.angleDelta.y / 8;
blockWheel = true;
scrollDelayer.start();
//positive direction
if (angle > 12) {
if (isLauncher || root.disableAllWindowsFunctionality) {
@ -908,6 +912,18 @@ MouseArea{
}
}
//! A timer is needed in order to handle also touchpads that probably
//! send too many signals very fast. This way the signals per sec are limited.
//! The user needs to have a steady normal scroll in order to not
//! notice a annoying delay
Timer{
id: scrollDelayer
interval: 400
onTriggered: mainItemContainer.blockWheel = false;
}
///////////////// End Of Mouse Area Events ///////////////////
///// Handlers for Signals /////

Loading…
Cancel
Save