on xenial help sign in
re-add commit line for redrag
cf7ba9cNick Dedekind
qml/Panel/IndicatorsMenu.qml+14−8
@@ -56,12 +56,13 @@ Showable {
56 }
56 }
57
57
58 height: minimizedPanelHeight
58 height: minimizedPanelHeight
59− onHeightChanged: {
60− var revealProgress = root.height - minimizedPanelHeight;
61
59
60+ onUnitProgressChanged: {
62 if (!showAnimation.running && !hideAnimation.running) {
61 if (!showAnimation.running && !hideAnimation.running) {
63− if (revealProgress <= 0) {
62+ if (unitProgress <= 0) {
64 root.state = "initial";
63 root.state = "initial";
64+ } else if (unitProgress >= 0.9 && d.hasCommitted) {
65+ root.state = "locked";
65 } else {
66 } else {
66 root.state = "reveal";
67 root.state = "reveal";
67 }
68 }
@@ -224,6 +225,7 @@ Showable {
224 QtObject {
225 QtObject {
225 id: d
226 id: d
226 property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
227 property var activeDragHandle: showDragHandle.dragging ? showDragHandle : hideDragHandle.dragging ? hideDragHandle : null
228+ property bool hasCommitted: false
227
229
228 property real rowMappedLateralPosition: {
230 property real rowMappedLateralPosition: {
229 if (!d.activeDragHandle) return -1;
231 if (!d.activeDragHandle) return -1;
@@ -234,6 +236,7 @@ Showable {
234 states: [
236 states: [
235 State {
237 State {
236 name: "initial"
238 name: "initial"
239+ PropertyChanges { target: d; hasCommitted: false; restoreEntryValues: false }
237 },
240 },
238 State {
241 State {
239 name: "reveal"
242 name: "reveal"
@@ -271,14 +274,17 @@ Showable {
271 return mapped.x;
274 return mapped.x;
272 }
275 }
273 }
276 }
277+ PropertyChanges { target: d; hasCommitted: false; restoreEntryValues: false }
278+ },
279+ State {
280+ name: "locked"
281+ PropertyChanges { target: bar; expanded: true }
274 },
282 },
275 State {
283 State {
276 name: "commit"
284 name: "commit"
285+ extend: "locked"
277− PropertyChanges {
286+ PropertyChanges { target: bar; interactive: true }
278− target: bar
287+ PropertyChanges { target: d; hasCommitted: true; restoreEntryValues: false }
279− expanded: true
280− interactive: true
281− }
282 }
288 }
283 ]
289 ]
284 state: "initial"
290 state: "initial"