on xenial help sign in
fixed vesa review comments
067e8ffNick Dedekind
qml/Components/ScrollCalculator.qml+4
@@ -84,5 +84,9 @@ Item {
84
84
85 property real progression: 0
85 property real progression: 0
86 property real threasholdAreaX: -scrollArea.thresholdAreaWidth
86 property real threasholdAreaX: -scrollArea.thresholdAreaWidth
87+
88+ Behavior on progression {
89+ SmoothedAnimation { velocity: 2.0 }
90+ }
87 }
91 }
88}
92}
qml/Panel/IndicatorItemRow.qml+3−2
@@ -200,14 +200,15 @@ Item {
200 return shiftPercentageOffset * units.gu(1);
200 return shiftPercentageOffset * units.gu(1);
201 }
201 }
202 Behavior on highlightCenterOffset {
202 Behavior on highlightCenterOffset {
203+ id: highlightCetnerOffsetBehavior
203− SmoothedAnimation { duration:UbuntuAnimation.FastDuration; velocity: 50; easing: UbuntuAnimation.StandardEasing }
204+ SmoothedAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
204 }
205 }
205
206
206 property real currentItemX: currentItem ? currentItem.x : 0 // having Behavior
207 property real currentItemX: currentItem ? currentItem.x : 0 // having Behavior
207 Behavior on currentItemX {
208 Behavior on currentItemX {
208 id: currentItemXBehavior
209 id: currentItemXBehavior
209 enabled: !d.firstItemSwitch && expanded
210 enabled: !d.firstItemSwitch && expanded
210− UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
211+ SmoothedAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
211 }
212 }
212 x: currentItemX + highlightCenterOffset
213 x: currentItemX + highlightCenterOffset
213 }
214 }
qml/Panel/IndicatorsBar.qml+10−2
@@ -43,6 +43,12 @@ Item {
43 row.setCurrentItemIndex(index);
43 row.setCurrentItemIndex(index);
44 }
44 }
45
45
46+ function alignLeft() {
47+ if (row.x > 0) {
48+ d.rowOffsetAdjustment = -row.x;
49+ }
50+ }
51+
46 function addScrollOffset(scrollAmmout) {
52 function addScrollOffset(scrollAmmout) {
47 var proposedScrollOffset = d.scrollOffset + scrollAmmout;
53 var proposedScrollOffset = d.scrollOffset + scrollAmmout;
48 var proposedCombinedOffset = d.combinedOffset - scrollAmmout;
54 var proposedCombinedOffset = d.combinedOffset - scrollAmmout;
@@ -90,7 +96,9 @@ Item {
90 }
96 }
91 }
97 }
92
98
99+ Behavior on rowOffsetAdjustment {
93− Behavior on rowOffsetAdjustment { NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing} }
100+ NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing}
101+ }
94 }
102 }
95
103
96 onExpandedChanged: {
104 onExpandedChanged: {
@@ -137,7 +145,7 @@ Item {
137 var dummyvar = d.scrollOffset + row.width;
145 var dummyvar = d.scrollOffset + row.width;
138
146
139 var mapped = root.mapToItem(row, root.lateralPosition, 0);
147 var mapped = root.mapToItem(row, root.lateralPosition, 0);
140− return mapped.x;
148+ return Math.min(Math.max(mapped.x, 0), row.width);
141 }
149 }
142 }
150 }
143
151
qml/Panel/IndicatorsMenu.qml+10−10
@@ -62,17 +62,20 @@ Showable {
62 var revealProgress = root.height - minimizedPanelHeight;
62 var revealProgress = root.height - minimizedPanelHeight;
63
63
64 if (!showAnimation.running && !hideAnimation.running) {
64 if (!showAnimation.running && !hideAnimation.running) {
65− if (revealProgress === 0) {
65+ if (revealProgress <= 0) {
66 root.state = "initial";
66 root.state = "initial";
67− } else if ((revealProgress > 0) && revealProgress < lockThreshold) {
68− root.state = "reveal";
69 } else {
67 } else {
70− root.state = "locked";
68+ root.state = "reveal";
71 }
69 }
72 }
70 }
73 }
71 }
74 clip: root.partiallyOpened
72 clip: root.partiallyOpened
75
73
74+ // eater
75+ MouseArea {
76+ anchors.fill: parent
77+ }
78+
76 MenuContent {
79 MenuContent {
77 id: content
80 id: content
78 objectName: "menuContent"
81 objectName: "menuContent"
@@ -203,6 +206,7 @@ Showable {
203 onRunningChanged: {
206 onRunningChanged: {
204 if (showAnimation.running) {
207 if (showAnimation.running) {
205 root.state = "commit";
208 root.state = "commit";
209+ bar.alignLeft();
206 }
210 }
207 }
211 }
208 }
212 }
@@ -278,7 +282,7 @@ Showable {
278 if (!d.activeDragHandle.dragging) return false;
282 if (!d.activeDragHandle.dragging) return false;
279
283
280 yVelocityCalculator.trackedPosition = d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0;
284 yVelocityCalculator.trackedPosition = d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0;
281− return Math.abs(yVelocityCalculator.calculate()) < 0.2;
285+ return Math.abs(yVelocityCalculator.calculate()) < 0.4;
282 }
286 }
283 }
287 }
284 // left scroll bar handling
288 // left scroll bar handling
@@ -304,13 +308,9 @@ Showable {
304 }
308 }
305 }
309 }
306 },
310 },
307− State {
308− name: "locked"
309− PropertyChanges { target: bar; expanded: true }
310− },
311 State {
311 State {
312 name: "commit"
312 name: "commit"
313− extend: "locked"
313+ PropertyChanges { target: bar; expanded: true }
314 }
314 }
315 ]
315 ]
316 state: "initial"
316 state: "initial"