on xenial help sign in
Fixed review comments
f86eb5bNick Dedekind
Panel/IndicatorRow.qml−2
@@ -26,8 +26,6 @@ Item {
26 property alias row: row
26 property alias row: row
27 property QtObject indicatorsModel: null
27 property QtObject indicatorsModel: null
28
28
29− Behavior on y { StandardAnimation {} }
30−
31 width: units.gu(40)
29 width: units.gu(40)
32 height: units.gu(3)
30 height: units.gu(3)
33
31
Panel/Indicators.qml+9−16
@@ -33,6 +33,7 @@ Showable {
33 readonly property int lockThreshold: openedHeight / 2
33 readonly property int lockThreshold: openedHeight / 2
34 property bool fullyOpened: height == openedHeight
34 property bool fullyOpened: height == openedHeight
35 property bool partiallyOpened: height > panelHeight && !fullyOpened
35 property bool partiallyOpened: height > panelHeight && !fullyOpened
36+ property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height)
36
37
37 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
38 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
38 // use its own values. Need to ask design about this.
39 // use its own values. Need to ask design about this.
@@ -100,8 +101,8 @@ Showable {
100 /*
101 /*
101 Vertical velocity check. Don't change the indicator if we're moving too quickly.
102 Vertical velocity check. Don't change the indicator if we're moving too quickly.
102 */
103 */
103− var verticalVelocity = Math.abs(yVelocityCalculator.calculate());
104+ var verticalSpeed = Math.abs(yVelocityCalculator.calculate());
104− if (verticalVelocity >= 0.05 && indicatorRow.currentItem!=null) {
105+ if (verticalSpeed >= 0.05 && indicatorRow.currentItem!=null) {
105 return;
106 return;
106 }
107 }
107
108
@@ -282,16 +283,15 @@ Showable {
282 }
283 }
283 }
284 }
284
285
285− property var dragHandle: null
286+ property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
286 // connections to the active drag handle
287 // connections to the active drag handle
287 Connections {
288 Connections {
288− target: dragHandle
289+ target: activeDragHandle
289 onTouchXChanged: {
290 onTouchXChanged: {
290− var buffer = dragHandle.dragging ? true : false;
291− indicators.calculateCurrentItem(dragHandle.touchX, buffer);
291+ indicators.calculateCurrentItem(activeDragHandle.touchX, true);
292 }
292 }
293 onTouchSceneYChanged: {
293 onTouchSceneYChanged: {
294− yVelocityCalculator.trackedPosition = dragHandle.touchSceneY;
294+ yVelocityCalculator.trackedPosition = activeDragHandle.touchSceneY;
295 }
295 }
296 }
296 }
297
297
@@ -316,9 +316,6 @@ Showable {
316 menuContent.activateContent();
316 menuContent.activateContent();
317 }
317 }
318 }
318 }
319− onDraggingChanged: {
320− dragHandle = dragging ? showDragHandle : null;
321− }
322 }
319 }
323 DragHandle {
320 DragHandle {
324 id: hideDragHandle
321 id: hideDragHandle
@@ -330,10 +327,6 @@ Showable {
330 stretch: true
327 stretch: true
331 maxTotalDragDistance: openedHeight - panelHeight
328 maxTotalDragDistance: openedHeight - panelHeight
332 distanceThreshold: 0
329 distanceThreshold: 0
333−
334− onDraggingChanged: {
335− dragHandle = dragging ? hideDragHandle : null;
336− }
337 }
330 }
338
331
339 AxisVelocityCalculator {
332 AxisVelocityCalculator {
@@ -352,8 +345,8 @@ Showable {
352 }
345 }
353 StateChangeScript {
346 StateChangeScript {
354 script: {
347 script: {
355− if (dragHandle) {
348+ if (activeDragHandle) {
356− calculateCurrentItem(dragHandle.touchX, false);
349+ calculateCurrentItem(activeDragHandle.touchX, false);
357 }
350 }
358 }
351 }
359 }
352 }
Panel/MenuContent.qml+1−1
@@ -146,7 +146,7 @@ Rectangle {
146 Indicators.MenuContentActivator {
146 Indicators.MenuContentActivator {
147 id: menuActivator
147 id: menuActivator
148 running: content.__contentActive
148 running: content.__contentActive
149− baseIndex: content.currentIndex
149+ baseIndex: content.currentMenuIndex
150 count: indicatorsModel.count
150 count: indicatorsModel.count
151 }
151 }
152}
152}
Panel/Panel.qml+1−1
@@ -90,10 +90,10 @@ Item {
90 id: indicatorsSeparatorLine
90 id: indicatorsSeparatorLine
91 visible: true
91 visible: true
92 anchors {
92 anchors {
93− top: indicatorsMenu.bottom
94 left: indicatorsMenu.left
93 left: indicatorsMenu.left
95 right: indicatorsMenu.right
94 right: indicatorsMenu.right
96 }
95 }
96+ y: indicatorsMenu.visualBottom
97 }
97 }
98
98
99 BorderImage {
99 BorderImage {