on xenial help sign in
s/Threashold/Threshold
commitee864bfccac539c2774b1570b3f4321b7d33a780 authorNick Dedekind <nick.dedekind@canonical.com> dateMon 13 Oct 2014, 16:09 (12 years ago) parentb3fced6
4 files changed+17−17
qml/Components/ScrollCalculator.qml+8−8 qml/Panel/IndicatorsMenu.qml+3−3 qml/Panel/PanelVelocityCalculator.qml+4−4 tests/qmltests/Panel/tst_IndicatorsMenu.qml+2−2
qml/Components/ScrollCalculator.qml+8−8
@@ -36,25 +36,25 @@ Item {
3636 onAreaActiveChanged: areaActive ? handleEnter() : handleExit()
3737
3838 function handleEnter() {
39− d.threasholdAreaX = -scrollArea.stopScrollThreshold;
39+ d.thresholdAreaX = -scrollArea.stopScrollThreshold;
4040 scrollTimer.restart();
4141 }
4242
4343 function handleExit() {
44− d.threasholdAreaX = -scrollArea.stopScrollThreshold;
44+ d.thresholdAreaX = -scrollArea.stopScrollThreshold;
4545 scrollTimer.stop();
4646 }
4747
4848 onLateralPositionChanged: {
4949 if (scrollArea.areaActive) {
5050 if (lateralPosition > width * (1 - forceScrollingPercentage)) {
51− d.threasholdAreaX = width * (1 - forceScrollingPercentage);
51+ d.thresholdAreaX = width * (1 - forceScrollingPercentage);
5252 if (!scrollTimer.running) scrollTimer.restart();
53− } else if (lateralPosition > d.threasholdAreaX + scrollArea.stopScrollThreshold) {
54− d.threasholdAreaX = lateralPosition - scrollArea.stopScrollThreshold;
53+ } else if (lateralPosition > d.thresholdAreaX + scrollArea.stopScrollThreshold) {
54+ d.thresholdAreaX = lateralPosition - scrollArea.stopScrollThreshold;
5555 if (!scrollTimer.running) scrollTimer.restart();
56− } else if (lateralPosition < d.threasholdAreaX) {
57− d.threasholdAreaX = lateralPosition;
56+ } else if (lateralPosition < d.thresholdAreaX) {
57+ d.thresholdAreaX = lateralPosition;
5858 scrollTimer.stop();
5959 }
6060
@@ -76,6 +76,6 @@ Item {
7676 QtObject {
7777 id: d
7878 property real progression: 0
79− property real threasholdAreaX: -scrollArea.stopScrollThreshold
79+ property real thresholdAreaX: -scrollArea.stopScrollThreshold
8080 }
8181}
qml/Panel/IndicatorsMenu.qml+3−3
@@ -25,7 +25,7 @@ Showable {
2525 property alias showDragHandle: __showDragHandle
2626 property alias hideDragHandle: __hideDragHandle
2727 property alias overFlowWidth: bar.overFlowWidth
28− property alias verticalVelocityThreashold: yVelocityCalculator.velocityThreashold
28+ property alias verticalVelocityThreshold: yVelocityCalculator.velocityThreshold
2929 property int minimizedPanelHeight: units.gu(3)
3030 property int expandedPanelHeight: units.gu(7)
3131 property real openedHeight: units.gu(71)
@@ -198,10 +198,10 @@ Showable {
198198
199199 PanelVelocityCalculator {
200200 id: yVelocityCalculator
201− velocityThreashold: 0.5
201+ velocityThreshold: 0.5
202202 trackedValue: d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0
203203
204− onVelocityThreasholdTriggered: bar.updateItemFromLateralPosition(bar.lateralPosition);
204+ onVelocityThresholdTriggered: bar.updateItemFromLateralPosition(bar.lateralPosition);
205205 }
206206
207207 Connections {
qml/Panel/PanelVelocityCalculator.qml+4−4
@@ -21,9 +21,9 @@ Item {
2121 id: root
2222 property real trackedValue: 0
2323 property bool stopLateralChanges: false
24− property real velocityThreashold: 0.4
24+ property real velocityThreshold: 0.4
2525
26− signal velocityThreasholdTriggered
26+ signal velocityThresholdTriggered
2727
2828 function reset() {
2929 stopLateralChanges = false;
@@ -31,7 +31,7 @@ Item {
3131 }
3232
3333 function calculate() {
34− stopLateralChanges = Math.abs(calc.calculate()) > velocityThreashold;
34+ stopLateralChanges = Math.abs(calc.calculate()) > velocityThreshold;
3535 }
3636
3737 onTrackedValueChanged: {
@@ -55,7 +55,7 @@ Item {
5555 if (root.stopLateralChanges) {
5656 velocityTimer.start();
5757 } else {
58− velocityThreasholdTriggered();
58+ velocityThresholdTriggered();
5959 }
6060 }
6161 }
tests/qmltests/Panel/tst_IndicatorsMenu.qml+2−2
@@ -101,7 +101,7 @@ IndicatorTest {
101101 tryCompare(indicatorsMenu.hideAnimation, "running", false);
102102 compare(indicatorsMenu.state, "initial");
103103
104− indicatorsMenu.verticalVelocityThreashold = 0.5
104+ indicatorsMenu.verticalVelocityThreshold = 0.5
105105 }
106106
107107 function get_indicator_item(index) {
@@ -208,7 +208,7 @@ IndicatorTest {
208208 // If the vertical velocity is above a specific point, we shouldnt change active indicators
209209 // if the x position changes
210210 function test_verticalVelocityDetector() {
211− indicatorsMenu.verticalVelocityThreashold = 0;
211+ indicatorsMenu.verticalVelocityThreshold = 0;
212212 verify(indicatorsModel.originalModelData.length >= 2);
213213
214214 var indicatorItemRow = findChild(indicatorsMenu, "indicatorItemRow");