on xenial help sign in
Fixes various issues encountered during review
ca44902Daniel d'Andrada
Panel/Indicators.qml+16−10
@@ -26,20 +26,21 @@ import "../Components/Math.js" as MathLocal
26Showable {
26Showable {
27 id: indicators
27 id: indicators
28
28
29− property int openedHeight: units.gu(71)
29+ property int referenceOpenedHeight: units.gu(71)
30+ property real openedHeight: pinnedMode ? referenceOpenedHeight - panelHeight
31+ : referenceOpenedHeight
30 property int panelHeight: units.gu(3)
32 property int panelHeight: units.gu(3)
31 property bool pinnedMode: true //should be set true if indicators menu can cover whole screen
33 property bool pinnedMode: true //should be set true if indicators menu can cover whole screen
32
34
33 property int hintValue
35 property int hintValue
34− readonly property int lockThreshold: openedHeight / 2
36+ readonly property int lockThreshold: referenceOpenedHeight / 2
35− property bool fullyOpened: pinnedMode ? height == openedHeight - panelHeight
36− : height == openedHeight
37+ property bool fullyOpened: height == openedHeight
37 property bool partiallyOpened: height > panelHeight && !fullyOpened
38 property bool partiallyOpened: height > panelHeight && !fullyOpened
38
39
39 showAnimation: StandardAnimation {
40 showAnimation: StandardAnimation {
40 property: "height"
41 property: "height"
41 duration: 350
42 duration: 350
42− to: pinnedMode ? openedHeight - panelHeight : openedHeight
43+ to: openedHeight
43 easing.type: Easing.OutCubic
44 easing.type: Easing.OutCubic
44 }
45 }
45
46
@@ -55,7 +56,7 @@ Showable {
55 onHeightChanged: {
56 onHeightChanged: {
56 // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
57 // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
57 var contentProgress = indicators.height - handle.get_height()
58 var contentProgress = indicators.height - handle.get_height()
58− if (!showAnimation.running && !hideAnimation.running /*&& !revealer.hintingAnimation.running*/) {
59+ if (!showAnimation.running && !hideAnimation.running) {
59 if (contentProgress <= hintValue && indicators.state == "reveal") {
60 if (contentProgress <= hintValue && indicators.state == "reveal") {
60 indicators.state = "hint"
61 indicators.state = "hint"
61 menuContent.hideAll()
62 menuContent.hideAll()
@@ -335,10 +336,15 @@ Showable {
335 hintDisplacement: pinnedMode ? indicators.hintValue : 0
336 hintDisplacement: pinnedMode ? indicators.hintValue : 0
336 autoCompleteDragThreshold: maxTotalDragDistance / 2
337 autoCompleteDragThreshold: maxTotalDragDistance / 2
337 stretch: true
338 stretch: true
338− maxTotalDragDistance:
339− pinnedMode ? openedHeight - panelHeight - handle.height
340− : openedHeight - handle.height
339+ maxTotalDragDistance: openedHeight - handle.height
341 distanceThreshold: pinnedMode ? 0 : units.gu(3)
340 distanceThreshold: pinnedMode ? 0 : units.gu(3)
341+
342+ onStatusChanged: {
343+ if (status === DirectionalDragArea.Recognized) {
344+ menuContent.hideAll()
345+ menuContent.activateContent()
346+ }
347+ }
342 }
348 }
343 DragHandle {
349 DragHandle {
344 id: hideDragHandle
350 id: hideDragHandle
@@ -349,7 +355,7 @@ Showable {
349 hintDisplacement: units.gu(2)
355 hintDisplacement: units.gu(2)
350 autoCompleteDragThreshold: maxTotalDragDistance / 6
356 autoCompleteDragThreshold: maxTotalDragDistance / 6
351 stretch: true
357 stretch: true
352− maxTotalDragDistance: openedHeight - 2*panelHeight
358+ maxTotalDragDistance: referenceOpenedHeight - 2*panelHeight
353 distanceThreshold: 0
359 distanceThreshold: 0
354 }
360 }
355
361
Panel/Panel.qml+2−2
@@ -83,11 +83,11 @@ Item {
83 shown: false
83 shown: false
84 hintValue: __panelMinusSeparatorLineHeight * 3
84 hintValue: __panelMinusSeparatorLineHeight * 3
85 panelHeight: __panelMinusSeparatorLineHeight
85 panelHeight: __panelMinusSeparatorLineHeight
86− openedHeight: parent.height
86+ referenceOpenedHeight: parent.height
87
87
88 pinnedMode: !fullscreenMode
88 pinnedMode: !fullscreenMode
89
89
90− property real unitProgress: height / parent.height
90+ property real unitProgress: (height - panelHeight) / (openedHeight - panelHeight)
91 }
91 }
92
92
93 SearchIndicator {
93 SearchIndicator {