@@ -25,14 +25,12 @@ import "../Components/Math.js" as MathLocal
2525Showable {
2626 id: indicators
2727
28− property int referenceOpenedHeight: units.gu(71)
29− property real openedHeight: pinnedMode ? referenceOpenedHeight - panelHeight
30− : referenceOpenedHeight
28+ property real openedHeight: units.gu(71)
3129 property int panelHeight: units.gu(3)
3230 property bool pinnedMode: true //should be set true if indicators menu can cover whole screen
3331
3432 property int hintValue
35− readonly property int lockThreshold: referenceOpenedHeight / 2
33+ readonly property int lockThreshold: openedHeight / 2
3634 property bool fullyOpened: height == openedHeight
3735 property bool partiallyOpened: height > panelHeight && !fullyOpened
3836
@@ -56,18 +54,20 @@ Showable {
5654
5755 onHeightChanged: {
5856 // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
59− var contentProgress = indicators.height - handle.get_height();
57+ var revealProgress = indicators.height - panelHeight
6058 if (!showAnimation.running && !hideAnimation.running) {
61− if (contentProgress <= hintValue && indicators.state == "reveal") {
59+ if (revealProgress == 0) {
60+ indicators.state = "initial"
61+ } else if (revealProgress <= hintValue && indicators.state == "reveal") {
6262 indicators.state = "hint";
63− } else if (contentProgress > hintValue && contentProgress < lockThreshold) {
63+ } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
6464 indicators.state = "reveal";
65− } else if (contentProgress >= lockThreshold && lockThreshold > 0) {
65+ } else if (revealProgress >= lockThreshold && lockThreshold > 0) {
6666 indicators.state = "locked";
6767 }
6868 }
6969
70− if (contentProgress == 0) {
70+ if (revealProgress == 0) {
7171 menuContent.releaseContent();
7272 }
7373 }
@@ -155,7 +155,7 @@ Showable {
155155 left: parent.left
156156 right: parent.right
157157 top: indicatorRow.bottom
158− bottom: parent.bottom
158+ bottom: handle.top
159159 }
160160 indicatorsModel: indicatorsModel
161161 clip: !indicators.fullyOpened
@@ -188,7 +188,7 @@ Showable {
188188 anchors {
189189 left: parent.left
190190 right: parent.right
191− top: menuContent.bottom
191+ bottom: parent.bottom
192192 }
193193 height: get_height()
194194 clip: height < handleImage.height
@@ -212,33 +212,14 @@ Showable {
212212 }
213213 }
214214
215− PanelSeparatorLine {
216− id: indicatorsSeparatorLine
217− visible: true
218− anchors {
219− top: handle.bottom
220− left: indicators.left
221− right: indicators.right
222− }
223− }
224−
225− BorderImage {
226− id: dropShadow
227− anchors {
228− top: indicators.top
229− bottom: indicatorsSeparatorLine.bottom
230− left: indicators.left
231− right: indicators.right
232− margins: -units.gu(1)
233− }
234− visible: indicators.height > panelHeight
235− source: "graphics/rectangular_dropshadow.sci"
236− }
237−
238215 PanelBackground {
239216 anchors.fill: indicatorRow
240217 }
241218
219+ IndicatorsDataModel {
220+ id: indicatorsModel
221+ }
222+
242223 IndicatorRow {
243224 id: indicatorRow
244225 objectName: "indicatorRow"
@@ -251,11 +232,6 @@ Showable {
251232 state: indicators.state
252233
253234 onCurrentItemIndexChanged: menuContent.currentIndex = currentItemIndex
254−
255− }
256−
257− IndicatorsDataModel {
258− id: indicatorsModel
259235 }
260236
261237 Connections {
@@ -314,7 +290,7 @@ Showable {
314290 hintDisplacement: pinnedMode ? indicators.hintValue : 0
315291 autoCompleteDragThreshold: maxTotalDragDistance / 2
316292 stretch: true
317− maxTotalDragDistance: openedHeight - handle.height
293+ maxTotalDragDistance: openedHeight - panelHeight
318294 distanceThreshold: pinnedMode ? 0 : units.gu(3)
319295
320296 onStatusChanged: {
@@ -326,13 +302,12 @@ Showable {
326302 DragHandle {
327303 id: hideDragHandle
328304 anchors.fill: handle
329− height: panelHeight
330305 direction: Direction.Upwards
331306 enabled: indicators.shown
332307 hintDisplacement: units.gu(2)
333308 autoCompleteDragThreshold: maxTotalDragDistance / 6
334309 stretch: true
335− maxTotalDragDistance: referenceOpenedHeight - 2*panelHeight
310+ maxTotalDragDistance: openedHeight - panelHeight
336311 distanceThreshold: 0
337312 }
338313