@@ -58,7 +58,7 @@ Showable {
58 if (!showAnimation.running && !hideAnimation.running) {
58 if (!showAnimation.running && !hideAnimation.running) {
59 if (revealProgress == 0) {
59 if (revealProgress == 0) {
60 indicators.state = "initial"
60 indicators.state = "initial"
61− } else if (revealProgress <= hintValue && indicators.state == "reveal") {
61+ } else if (revealProgress <= hintValue) {
62 indicators.state = "hint";
62 indicators.state = "hint";
63 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
63 } else if (revealProgress > hintValue && revealProgress < lockThreshold) {
64 indicators.state = "reveal";
64 indicators.state = "reveal";
@@ -123,6 +123,8 @@ Showable {
123 if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItem < 0 || indicatorRow.currentItem == null) {
123 if ((!useBuffer || (useBuffer && bufferExceeded)) || indicatorRow.currentItem < 0 || indicatorRow.currentItem == null) {
124 indicatorRow.currentItem = currentItem;
124 indicatorRow.currentItem = currentItem;
126+ } else if (!currentItem) {
127+ indicatorRow.setDefaultItem();
@@ -239,10 +241,7 @@ Showable {
239 onRunningChanged: {
241 onRunningChanged: {
240 if (hideAnimation.running) {
242 if (hideAnimation.running) {
241 indicators.state = "initial"
243 indicators.state = "initial"
243− if (state == "initial") {
244− indicatorRow.setDefaultItem()
244+ indicatorRow.currentItem = null;
@@ -264,18 +263,6 @@ Showable {
267− // We start with pinned states. (default pinnedMode: true)
268− states: pinnedModeStates
269− // because of dynamic assignment of states, we need to assign state after completion.
270− Component.onCompleted: state = "initial"
272− // changing states will reset state to "".
273− onPinnedModeChanged: {
274− var last_state = state;
275− states = (pinnedMode) ? pinnedModeStates : offScreenModeStates;
279 property var dragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle
266 property var dragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle
280 DragHandle {
267 DragHandle {
281 id: showDragHandle
268 id: showDragHandle
@@ -311,18 +298,27 @@ Showable {
311 distanceThreshold: 0
298 distanceThreshold: 0
314− property list<State> offScreenModeStates: [
301+ states: [
316 name: "initial"
303 name: "initial"
319 name: "hint"
306 name: "hint"
320− PropertyChanges { target: indicatorRow; y: panelHeight }
308+ target: indicatorRow;
309+ y: pinnedMode ? 0 : panelHeight
314+ calculateCurrentItem(dragHandle.touchX, false);
323 name: "reveal"
320 name: "reveal"
324 extend: "hint"
321 extend: "hint"
325− StateChangeScript { script: calculateCurrentItem(dragHandle.touchX, false); }
328 name: "locked"
324 name: "locked"
@@ -333,25 +329,7 @@ Showable {
333 extend: "hint"
329 extend: "hint"
337− property list<State> pinnedModeStates: [
339− name: "initial"
332+ state: "initial"
346− StateChangeScript { script: calculateCurrentItem(dragHandle.touchX, false); }
356 transitions: [
334 transitions: [
357 Transition {
335 Transition {