@@ -26,20 +26,21 @@ import "../Components/Math.js" as MathLocal
2626Showable {
2727 id: indicators
2828
29− property int openedHeight: units.gu(71)
29+ property int referenceOpenedHeight: units.gu(71)
30+ property real openedHeight: pinnedMode ? referenceOpenedHeight - panelHeight
31+ : referenceOpenedHeight
3032 property int panelHeight: units.gu(3)
3133 property bool pinnedMode: true //should be set true if indicators menu can cover whole screen
3234
3335 property int hintValue
34− readonly property int lockThreshold: openedHeight / 2
35− property bool fullyOpened: pinnedMode ? height == openedHeight - panelHeight
36− : height == openedHeight
36+ readonly property int lockThreshold: referenceOpenedHeight / 2
37+ property bool fullyOpened: height == openedHeight
3738 property bool partiallyOpened: height > panelHeight && !fullyOpened
3839
3940 showAnimation: StandardAnimation {
4041 property: "height"
4142 duration: 350
42− to: pinnedMode ? openedHeight - panelHeight : openedHeight
43+ to: openedHeight
4344 easing.type: Easing.OutCubic
4445 }
4546
@@ -55,7 +56,7 @@ Showable {
5556 onHeightChanged: {
5657 // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
5758 var contentProgress = indicators.height - handle.get_height()
58− if (!showAnimation.running && !hideAnimation.running /*&& !revealer.hintingAnimation.running*/) {
59+ if (!showAnimation.running && !hideAnimation.running) {
5960 if (contentProgress <= hintValue && indicators.state == "reveal") {
6061 indicators.state = "hint"
6162 menuContent.hideAll()
@@ -335,10 +336,15 @@ Showable {
335336 hintDisplacement: pinnedMode ? indicators.hintValue : 0
336337 autoCompleteDragThreshold: maxTotalDragDistance / 2
337338 stretch: true
338− maxTotalDragDistance:
339− pinnedMode ? openedHeight - panelHeight - handle.height
340− : openedHeight - handle.height
339+ maxTotalDragDistance: openedHeight - handle.height
341340 distanceThreshold: pinnedMode ? 0 : units.gu(3)
341+
342+ onStatusChanged: {
343+ if (status === DirectionalDragArea.Recognized) {
344+ menuContent.hideAll()
345+ menuContent.activateContent()
346+ }
347+ }
342348 }
343349 DragHandle {
344350 id: hideDragHandle
@@ -349,7 +355,7 @@ Showable {
349355 hintDisplacement: units.gu(2)
350356 autoCompleteDragThreshold: maxTotalDragDistance / 6
351357 stretch: true
352− maxTotalDragDistance: openedHeight - 2*panelHeight
358+ maxTotalDragDistance: referenceOpenedHeight - 2*panelHeight
353359 distanceThreshold: 0
354360 }
355361