on xenial help sign in
Fix closing of the indicators menu
commit5529608b03d43bcab6243e3375c886be0c6e9bbd authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 10 Dec 2015, 15:46 (11 years ago) parent19f13df
2 files changed+7−1
qml/Components/DragHandle.qml+2 qml/Panel/IndicatorsMenu.qml+5−1
qml/Components/DragHandle.qml+2
@@ -179,6 +179,8 @@ SwipeArea {
179179 onDistanceChanged: {
180180 if (dragging) {
181181 // don't go the whole distance in order to smooth out the movement
182+ if (!Direction.isPositive(direction))
183+ distance = -distance;
182184 var toAdd = d.limitMovement(distance);
183185 parent[d.targetProp] = d.startValue + toAdd;
184186 }
qml/Panel/IndicatorsMenu.qml+5−1
@@ -236,7 +236,11 @@ Showable {
236236 PanelVelocityCalculator {
237237 id: yVelocityCalculator
238238 velocityThreshold: d.hasCommitted ? 0.1 : 0.3
239− trackedValue: d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0
239+ trackedValue: d.activeDragHandle ?
240+ (Direction.isPositive(d.activeDragHandle.direction) ?
241+ d.activeDragHandle.distance :
242+ -d.activeDragHandle.distance)
243+ : 0
240244
241245 onVelocityAboveThresholdChanged: d.updateState()
242246 }