on xenial help sign in
Update state of indicators bar only when the user is actively dragging himself
c9074a5Albert Astals Cid
qml/Panel/IndicatorsMenu.qml+1−1
@@ -270,7 +270,7 @@ Showable {
270 }
270 }
271
271
272 function updateState() {
272 function updateState() {
273− if (!showAnimation.running && !hideAnimation.running) {
273+ if (!showAnimation.running && !hideAnimation.running && d.activeDragHandle) {
274 if (unitProgress <= 0) {
274 if (unitProgress <= 0) {
275 root.state = "initial";
275 root.state = "initial";
276 // lock indicator if we've been committed and aren't moving too much laterally or too fast up.
276 // lock indicator if we've been committed and aren't moving too much laterally or too fast up.
tests/autopilot/unity8/indicators/__init__.py+1
@@ -74,6 +74,7 @@ class Indicator():
74 # XXX this should be implemented as a general horizontal swiping in
74 # XXX this should be implemented as a general horizontal swiping in
75 # the toolkit custom proxy object. -- elopio - 2015-01-20
75 # the toolkit custom proxy object. -- elopio - 2015-01-20
76 if not flickable.atXEnd:
76 if not flickable.atXEnd:
77+ flickable.interactive.wait_for(True)
77 while not flickable.atXEnd:
78 while not flickable.atXEnd:
78 start_y = stop_y = (
79 start_y = stop_y = (
79 flickable.globalRect.y +
80 flickable.globalRect.y +
tests/qmltests/Panel/tst_IndicatorsMenu.qml+6
@@ -145,11 +145,17 @@ IndicatorTest {
145 }
145 }
146
146
147 function test_progress_changes_state_to_reveal() {
147 function test_progress_changes_state_to_reveal() {
148+ var firstItem = get_indicator_item(0);
149+ var firstItemMappedPosition = indicatorsMenu.mapFromItem(firstItem, firstItem.width/2, firstItem.height/2);
150+ touchPress(indicatorsMenu, firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight / 2);
151+
148 indicatorsMenu.height = indicatorsMenu.openedHeight / 2;
152 indicatorsMenu.height = indicatorsMenu.openedHeight / 2;
149 compare(indicatorsMenu.state, "reveal", "Indicators should be revealing when partially opened.");
153 compare(indicatorsMenu.state, "reveal", "Indicators should be revealing when partially opened.");
150
154
151 indicatorsMenu.height = indicatorsMenu.openedHeight;
155 indicatorsMenu.height = indicatorsMenu.openedHeight;
152 compare(indicatorsMenu.state, "reveal", "Indicators should still be revealing when fully opened.");
156 compare(indicatorsMenu.state, "reveal", "Indicators should still be revealing when fully opened.");
157+
158+ touchRelease(indicatorsMenu, firstItemMappedPosition.x, indicatorsMenu.minimizedPanelHeight / 2);
153 }
159 }
154
160
155 function test_open_state() {
161 function test_open_state() {