on xenial help sign in
s/Threashold/Threshold
ee864bfNick Dedekind
qml/Components/ScrollCalculator.qml+8−8
@@ -36,25 +36,25 @@ Item {
36 onAreaActiveChanged: areaActive ? handleEnter() : handleExit()
36 onAreaActiveChanged: areaActive ? handleEnter() : handleExit()
37
37
38 function handleEnter() {
38 function handleEnter() {
39− d.threasholdAreaX = -scrollArea.stopScrollThreshold;
39+ d.thresholdAreaX = -scrollArea.stopScrollThreshold;
40 scrollTimer.restart();
40 scrollTimer.restart();
41 }
41 }
42
42
43 function handleExit() {
43 function handleExit() {
44− d.threasholdAreaX = -scrollArea.stopScrollThreshold;
44+ d.thresholdAreaX = -scrollArea.stopScrollThreshold;
45 scrollTimer.stop();
45 scrollTimer.stop();
46 }
46 }
47
47
48 onLateralPositionChanged: {
48 onLateralPositionChanged: {
49 if (scrollArea.areaActive) {
49 if (scrollArea.areaActive) {
50 if (lateralPosition > width * (1 - forceScrollingPercentage)) {
50 if (lateralPosition > width * (1 - forceScrollingPercentage)) {
51− d.threasholdAreaX = width * (1 - forceScrollingPercentage);
51+ d.thresholdAreaX = width * (1 - forceScrollingPercentage);
52 if (!scrollTimer.running) scrollTimer.restart();
52 if (!scrollTimer.running) scrollTimer.restart();
53− } else if (lateralPosition > d.threasholdAreaX + scrollArea.stopScrollThreshold) {
53+ } else if (lateralPosition > d.thresholdAreaX + scrollArea.stopScrollThreshold) {
54− d.threasholdAreaX = lateralPosition - scrollArea.stopScrollThreshold;
54+ d.thresholdAreaX = lateralPosition - scrollArea.stopScrollThreshold;
55 if (!scrollTimer.running) scrollTimer.restart();
55 if (!scrollTimer.running) scrollTimer.restart();
56− } else if (lateralPosition < d.threasholdAreaX) {
56+ } else if (lateralPosition < d.thresholdAreaX) {
57− d.threasholdAreaX = lateralPosition;
57+ d.thresholdAreaX = lateralPosition;
58 scrollTimer.stop();
58 scrollTimer.stop();
59 }
59 }
60
60
@@ -76,6 +76,6 @@ Item {
76 QtObject {
76 QtObject {
77 id: d
77 id: d
78 property real progression: 0
78 property real progression: 0
79− property real threasholdAreaX: -scrollArea.stopScrollThreshold
79+ property real thresholdAreaX: -scrollArea.stopScrollThreshold
80 }
80 }
81}
81}
qml/Panel/IndicatorsMenu.qml+3−3
@@ -25,7 +25,7 @@ Showable {
25 property alias showDragHandle: __showDragHandle
25 property alias showDragHandle: __showDragHandle
26 property alias hideDragHandle: __hideDragHandle
26 property alias hideDragHandle: __hideDragHandle
27 property alias overFlowWidth: bar.overFlowWidth
27 property alias overFlowWidth: bar.overFlowWidth
28− property alias verticalVelocityThreashold: yVelocityCalculator.velocityThreashold
28+ property alias verticalVelocityThreshold: yVelocityCalculator.velocityThreshold
29 property int minimizedPanelHeight: units.gu(3)
29 property int minimizedPanelHeight: units.gu(3)
30 property int expandedPanelHeight: units.gu(7)
30 property int expandedPanelHeight: units.gu(7)
31 property real openedHeight: units.gu(71)
31 property real openedHeight: units.gu(71)
@@ -198,10 +198,10 @@ Showable {
198
198
199 PanelVelocityCalculator {
199 PanelVelocityCalculator {
200 id: yVelocityCalculator
200 id: yVelocityCalculator
201− velocityThreashold: 0.5
201+ velocityThreshold: 0.5
202 trackedValue: d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0
202 trackedValue: d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0
203
203
204− onVelocityThreasholdTriggered: bar.updateItemFromLateralPosition(bar.lateralPosition);
204+ onVelocityThresholdTriggered: bar.updateItemFromLateralPosition(bar.lateralPosition);
205 }
205 }
206
206
207 Connections {
207 Connections {
qml/Panel/PanelVelocityCalculator.qml+4−4
@@ -21,9 +21,9 @@ Item {
21 id: root
21 id: root
22 property real trackedValue: 0
22 property real trackedValue: 0
23 property bool stopLateralChanges: false
23 property bool stopLateralChanges: false
24− property real velocityThreashold: 0.4
24+ property real velocityThreshold: 0.4
25
25
26− signal velocityThreasholdTriggered
26+ signal velocityThresholdTriggered
27
27
28 function reset() {
28 function reset() {
29 stopLateralChanges = false;
29 stopLateralChanges = false;
@@ -31,7 +31,7 @@ Item {
31 }
31 }
32
32
33 function calculate() {
33 function calculate() {
34− stopLateralChanges = Math.abs(calc.calculate()) > velocityThreashold;
34+ stopLateralChanges = Math.abs(calc.calculate()) > velocityThreshold;
35 }
35 }
36
36
37 onTrackedValueChanged: {
37 onTrackedValueChanged: {
@@ -55,7 +55,7 @@ Item {
55 if (root.stopLateralChanges) {
55 if (root.stopLateralChanges) {
56 velocityTimer.start();
56 velocityTimer.start();
57 } else {
57 } else {
58− velocityThreasholdTriggered();
58+ velocityThresholdTriggered();
59 }
59 }
60 }
60 }
61 }
61 }
tests/qmltests/Panel/tst_IndicatorsMenu.qml+2−2
@@ -101,7 +101,7 @@ IndicatorTest {
101 tryCompare(indicatorsMenu.hideAnimation, "running", false);
101 tryCompare(indicatorsMenu.hideAnimation, "running", false);
102 compare(indicatorsMenu.state, "initial");
102 compare(indicatorsMenu.state, "initial");
103
103
104− indicatorsMenu.verticalVelocityThreashold = 0.5
104+ indicatorsMenu.verticalVelocityThreshold = 0.5
105 }
105 }
106
106
107 function get_indicator_item(index) {
107 function get_indicator_item(index) {
@@ -208,7 +208,7 @@ IndicatorTest {
208 // If the vertical velocity is above a specific point, we shouldnt change active indicators
208 // If the vertical velocity is above a specific point, we shouldnt change active indicators
209 // if the x position changes
209 // if the x position changes
210 function test_verticalVelocityDetector() {
210 function test_verticalVelocityDetector() {
211− indicatorsMenu.verticalVelocityThreashold = 0;
211+ indicatorsMenu.verticalVelocityThreshold = 0;
212 verify(indicatorsModel.originalModelData.length >= 2);
212 verify(indicatorsModel.originalModelData.length >= 2);
213
213
214 var indicatorItemRow = findChild(indicatorsMenu, "indicatorItemRow");
214 var indicatorItemRow = findChild(indicatorsMenu, "indicatorItemRow");