on xenial help sign in
fixed vesa review comments
commit067e8ffb221152a09e0041cb28c2cf1ac39dde5c authorNick Dedekind <nick.dedekind@canonical.com> dateWed 8 Oct 2014, 13:21 (12 years ago) parent53878bf
4 files changed+27−14
qml/Components/ScrollCalculator.qml+4 qml/Panel/IndicatorItemRow.qml+3−2 qml/Panel/IndicatorsBar.qml+10−2 qml/Panel/IndicatorsMenu.qml+10−10
qml/Components/ScrollCalculator.qml+4
@@ -84,5 +84,9 @@ Item {
8484
8585 property real progression: 0
8686 property real threasholdAreaX: -scrollArea.thresholdAreaWidth
87+
88+ Behavior on progression {
89+ SmoothedAnimation { velocity: 2.0 }
90+ }
8791 }
8892}
qml/Panel/IndicatorItemRow.qml+3−2
@@ -200,14 +200,15 @@ Item {
200200 return shiftPercentageOffset * units.gu(1);
201201 }
202202 Behavior on highlightCenterOffset {
203− SmoothedAnimation { duration:UbuntuAnimation.FastDuration; velocity: 50; easing: UbuntuAnimation.StandardEasing }
203+ id: highlightCetnerOffsetBehavior
204+ SmoothedAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
204205 }
205206
206207 property real currentItemX: currentItem ? currentItem.x : 0 // having Behavior
207208 Behavior on currentItemX {
208209 id: currentItemXBehavior
209210 enabled: !d.firstItemSwitch && expanded
210− UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
211+ SmoothedAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
211212 }
212213 x: currentItemX + highlightCenterOffset
213214 }
qml/Panel/IndicatorsBar.qml+10−2
@@ -43,6 +43,12 @@ Item {
4343 row.setCurrentItemIndex(index);
4444 }
4545
46+ function alignLeft() {
47+ if (row.x > 0) {
48+ d.rowOffsetAdjustment = -row.x;
49+ }
50+ }
51+
4652 function addScrollOffset(scrollAmmout) {
4753 var proposedScrollOffset = d.scrollOffset + scrollAmmout;
4854 var proposedCombinedOffset = d.combinedOffset - scrollAmmout;
@@ -90,7 +96,9 @@ Item {
9096 }
9197 }
9298
93− Behavior on rowOffsetAdjustment { NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing} }
99+ Behavior on rowOffsetAdjustment {
100+ NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing}
101+ }
94102 }
95103
96104 onExpandedChanged: {
@@ -137,7 +145,7 @@ Item {
137145 var dummyvar = d.scrollOffset + row.width;
138146
139147 var mapped = root.mapToItem(row, root.lateralPosition, 0);
140− return mapped.x;
148+ return Math.min(Math.max(mapped.x, 0), row.width);
141149 }
142150 }
143151
qml/Panel/IndicatorsMenu.qml+10−10
@@ -62,17 +62,20 @@ Showable {
6262 var revealProgress = root.height - minimizedPanelHeight;
6363
6464 if (!showAnimation.running && !hideAnimation.running) {
65− if (revealProgress === 0) {
65+ if (revealProgress <= 0) {
6666 root.state = "initial";
67− } else if ((revealProgress > 0) && revealProgress < lockThreshold) {
68− root.state = "reveal";
6967 } else {
70− root.state = "locked";
68+ root.state = "reveal";
7169 }
7270 }
7371 }
7472 clip: root.partiallyOpened
7573
74+ // eater
75+ MouseArea {
76+ anchors.fill: parent
77+ }
78+
7679 MenuContent {
7780 id: content
7881 objectName: "menuContent"
@@ -203,6 +206,7 @@ Showable {
203206 onRunningChanged: {
204207 if (showAnimation.running) {
205208 root.state = "commit";
209+ bar.alignLeft();
206210 }
207211 }
208212 }
@@ -278,7 +282,7 @@ Showable {
278282 if (!d.activeDragHandle.dragging) return false;
279283
280284 yVelocityCalculator.trackedPosition = d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0;
281− return Math.abs(yVelocityCalculator.calculate()) < 0.2;
285+ return Math.abs(yVelocityCalculator.calculate()) < 0.4;
282286 }
283287 }
284288 // left scroll bar handling
@@ -304,13 +308,9 @@ Showable {
304308 }
305309 }
306310 },
307− State {
308− name: "locked"
309− PropertyChanges { target: bar; expanded: true }
310− },
311311 State {
312312 name: "commit"
313− extend: "locked"
313+ PropertyChanges { target: bar; expanded: true }
314314 }
315315 ]
316316 state: "initial"