@@ -35,6 +35,7 @@ Showable {
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 property real visualBottom: Math.max(y+height, y+indicatorRow.y+indicatorRow.height)
37 property bool contentEnabled: true
37 property bool contentEnabled: true
38+ property bool initalizeItem: true
39 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
40 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
40 // use its own values. Need to ask design about this.
41 // use its own values. Need to ask design about this.
@@ -60,14 +61,13 @@ Showable {
62 height: panelHeight
63 height: panelHeight
64+ onHeightChanged: updateRevealProgressState(indicators.height - panelHeight, true)
64− onHeightChanged: {
66+ function updateRevealProgressState(revealProgress, enableRelease) {
65− // need to use handle.get_height(). As the handle height depends on indicators.height changes (but this is called first!)
66− var revealProgress = indicators.height - panelHeight
67 if (!showAnimation.running && !hideAnimation.running) {
67 if (!showAnimation.running && !hideAnimation.running) {
68− if (revealProgress == 0) {
68+ if (revealProgress === 0) {
69 indicators.state = "initial";
69 indicators.state = "initial";
70− } else if (revealProgress <= hintValue) {
70+ } else if (revealProgress > 0 && revealProgress <= hintValue) {
71 indicators.state = "hint";
71 indicators.state = "hint";
72 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
72 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
73 indicators.state = "reveal";
73 indicators.state = "reveal";
@@ -76,7 +76,7 @@ Showable {
79− if (revealProgress == 0) {
79+ if (enableRelease && revealProgress === 0) {
80 menuContent.releaseContent();
80 menuContent.releaseContent();
@@ -103,7 +103,7 @@ Showable {
103 Vertical velocity check. Don't change the indicator if we're moving too quickly.
103 Vertical velocity check. Don't change the indicator if we're moving too quickly.
105 var verticalSpeed = Math.abs(yVelocityCalculator.calculate());
105 var verticalSpeed = Math.abs(yVelocityCalculator.calculate());
106− if (verticalSpeed >= 0.05 && indicatorRow.currentItem!=null) {
106+ if (verticalSpeed >= 0.05 && !initalizeItem) {
@@ -143,6 +143,7 @@ Showable {
143 } else if (!currentItem) {
143 } else if (!currentItem) {
144 indicatorRow.setDefaultItem();
144 indicatorRow.setDefaultItem();
146+ initalizeItem = indicatorRow.currentItem == null;
@@ -276,6 +277,37 @@ Showable {
276 enableIndexChangeSignal = oldActive;
277 enableIndexChangeSignal = oldActive;
283+ anchors.fill: parent
284+ direction: Direction.Downwards
285+ maxSilenceTime: 2000
287+ enabled: fullyOpened
288+ onDraggingChanged: {
290+ initalizeItem = true;
291+ updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false);
293+ indicators.state = "commit";
298+ if (touchSceneY - panelHeight > 0) {
299+ indicators.calculateCurrentItem(touchX, true);
302+ onTouchSceneYChanged: {
303+ updateRevealProgressState(Math.max(touchSceneY - panelHeight, hintValue), false);
304+ yVelocityCalculator.trackedPosition = touchSceneY;
306+ if (initalizeItem && touchSceneY - panelHeight > 0) {
307+ indicators.calculateCurrentItem(touchX, true);
281 Connections {
313 Connections {
@@ -292,7 +324,7 @@ Showable {
292 onRunningChanged: {
324 onRunningChanged: {
293 if (hideAnimation.running) {
325 if (hideAnimation.running) {
294 indicators.state = "initial";
326 indicators.state = "initial";
295− indicatorRow.currentItem = null;
327+ initalizeItem = true;