on xenial help sign in
removed explicit panel hiding
9948b39Nick Dedekind
qml/Panel/Indicators.qml+1
@@ -276,6 +276,7 @@ Showable {
276 indicators.calculateCurrentItem(touchX, false);
276 indicators.calculateCurrentItem(touchX, false);
277 } else {
277 } else {
278 indicators.state = "commit";
278 indicators.state = "commit";
279+ indicatorRow.currentItemOffset = 0;
279 }
280 }
280 }
281 }
281
282
qml/Panel/Indicators/MenuItemFactory.qml−6
@@ -133,7 +133,6 @@ Item {
133
133
134 onTriggered: {
134 onTriggered: {
135 menuModel.activate(menuIndex);
135 menuModel.activate(menuIndex);
136− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
137 }
136 }
138 }
137 }
139 }
138 }
@@ -176,7 +175,6 @@ Item {
176
175
177 onTriggered: {
176 onTriggered: {
178 menuModel.activate(menuIndex);
177 menuModel.activate(menuIndex);
179− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
180 }
178 }
181 }
179 }
182 }
180 }
@@ -194,7 +192,6 @@ Item {
194
192
195 onTriggered: {
193 onTriggered: {
196 menuModel.activate(menuIndex);
194 menuModel.activate(menuIndex);
197− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
198 }
195 }
199 }
196 }
200 }
197 }
@@ -214,7 +211,6 @@ Item {
214
211
215 onTriggered: {
212 onTriggered: {
216 menuModel.activate(menuIndex);
213 menuModel.activate(menuIndex);
217− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
218 }
214 }
219 }
215 }
220 }
216 }
@@ -351,7 +347,6 @@ Item {
351 }
347 }
352 onTriggered: {
348 onTriggered: {
353 menuModel.activate(menuIndex);
349 menuModel.activate(menuIndex);
354− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
355 }
350 }
356
351
357 function loadAttributes() {
352 function loadAttributes() {
@@ -394,7 +389,6 @@ Item {
394 }
389 }
395 onClicked: {
390 onClicked: {
396 menuModel.activate(menuIndex, true);
391 menuModel.activate(menuIndex, true);
397− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
398 }
392 }
399 onDismissed: {
393 onDismissed: {
400 menuModel.activate(menuIndex, false);
394 menuModel.activate(menuIndex, false);
qml/Panel/Indicators/MessageMenuItemFactory.qml−3
@@ -94,7 +94,6 @@ Item {
94
94
95 onAppActivated: {
95 onAppActivated: {
96 menuModel.activate(menuIndex, true);
96 menuModel.activate(menuIndex, true);
97− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
98 }
97 }
99 onDismissed: {
98 onDismissed: {
100 menuModel.activate(menuIndex, false);
99 menuModel.activate(menuIndex, false);
@@ -142,7 +141,6 @@ Item {
142
141
143 onAppActivated: {
142 onAppActivated: {
144 menuModel.activate(menuIndex, true);
143 menuModel.activate(menuIndex, true);
145− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
146 }
144 }
147 onDismissed: {
145 onDismissed: {
148 menuModel.activate(menuIndex, false);
146 menuModel.activate(menuIndex, false);
@@ -201,7 +199,6 @@ Item {
201
199
202 onAppActivated: {
200 onAppActivated: {
203 menuModel.activate(menuIndex, true);
201 menuModel.activate(menuIndex, true);
204− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
205 }
202 }
206 onDismissed: {
203 onDismissed: {
207 menuModel.activate(menuIndex, false);
204 menuModel.activate(menuIndex, false);
qml/Panel/Panel.qml−22
@@ -31,28 +31,6 @@ Item {
31
31
32 signal searchClicked
32 signal searchClicked
33
33
34− function hideIndicatorMenu(delay) {
35− if (delay !== undefined) {
36− hideTimer.interval = delay;
37− hideTimer.start();
38− } else {
39− indicatorsMenu.hide();
40− }
41− }
42−
43− Timer {
44− id: hideTimer
45− running: false
46− onTriggered: {
47− indicatorsMenu.hide();
48− }
49− }
50−
51− Connections {
52− target: indicatorsMenu
53− onShownChanged: hideTimer.stop()
54− }
55−
56 PanelBackground {
34 PanelBackground {
57 id: panelBackground
35 id: panelBackground
58 anchors {
36 anchors {
qml/Shell.qml−4
@@ -472,10 +472,6 @@ FocusScope {
472 stages.hide()
472 stages.hide()
473 }
473 }
474
474
475− function hideIndicatorMenu(delay) {
476− panel.hideIndicatorMenu(delay);
477− }
478−
479 Item {
475 Item {
480 id: overlay
476 id: overlay
481
477
tests/qmltests/Panel/tst_Panel.qml−14
@@ -268,19 +268,5 @@ Item {
268
268
269 compare(indicatorRow.currentItem, indicatorItemFirst, "First indicator should still be the current item");
269 compare(indicatorRow.currentItem, indicatorItemFirst, "First indicator should still be the current item");
270 }
270 }
271−
272− function test_hideIndicatorMenu_data() {
273− return [ {tag: "no-delay", delay: undefined },
274− {tag: "delayed", delay: 200 }
275− ];
276− }
277−
278− function test_hideIndicatorMenu(data) {
279− panel.indicators.show();
280− compare(panel.indicators.shown, true);
281−
282− panel.hideIndicatorMenu(data.delay);
283− tryCompare(panel.indicators, "shown", false);
284− }
285 }
271 }
286}
272}