on xenial help sign in
removed explicit panel hiding
commit9948b393f7e430e1aa85b3d5d7a5a5194624cfc9 authorNick Dedekind <nicholas.dedekind@gmail.com> dateWed 2 Jul 2014, 15:18 (12 years ago) parentb87b9b8
6 files changed+1−49
qml/Panel/Indicators.qml+1 qml/Panel/Indicators/MenuItemFactory.qml−6 qml/Panel/Indicators/MessageMenuItemFactory.qml−3 qml/Panel/Panel.qml−22 qml/Shell.qml−4 tests/qmltests/Panel/tst_Panel.qml−14
qml/Panel/Indicators.qml+1
@@ -276,6 +276,7 @@ Showable {
276276 indicators.calculateCurrentItem(touchX, false);
277277 } else {
278278 indicators.state = "commit";
279+ indicatorRow.currentItemOffset = 0;
279280 }
280281 }
281282
qml/Panel/Indicators/MenuItemFactory.qml−6
@@ -133,7 +133,6 @@ Item {
133133
134134 onTriggered: {
135135 menuModel.activate(menuIndex);
136− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
137136 }
138137 }
139138 }
@@ -176,7 +175,6 @@ Item {
176175
177176 onTriggered: {
178177 menuModel.activate(menuIndex);
179− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
180178 }
181179 }
182180 }
@@ -194,7 +192,6 @@ Item {
194192
195193 onTriggered: {
196194 menuModel.activate(menuIndex);
197− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
198195 }
199196 }
200197 }
@@ -214,7 +211,6 @@ Item {
214211
215212 onTriggered: {
216213 menuModel.activate(menuIndex);
217− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
218214 }
219215 }
220216 }
@@ -351,7 +347,6 @@ Item {
351347 }
352348 onTriggered: {
353349 menuModel.activate(menuIndex);
354− shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration);
355350 }
356351
357352 function loadAttributes() {
@@ -394,7 +389,6 @@ Item {
394389 }
395390 onClicked: {
396391 menuModel.activate(menuIndex, true);
397− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
398392 }
399393 onDismissed: {
400394 menuModel.activate(menuIndex, false);
qml/Panel/Indicators/MessageMenuItemFactory.qml−3
@@ -94,7 +94,6 @@ Item {
9494
9595 onAppActivated: {
9696 menuModel.activate(menuIndex, true);
97− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
9897 }
9998 onDismissed: {
10099 menuModel.activate(menuIndex, false);
@@ -142,7 +141,6 @@ Item {
142141
143142 onAppActivated: {
144143 menuModel.activate(menuIndex, true);
145− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
146144 }
147145 onDismissed: {
148146 menuModel.activate(menuIndex, false);
@@ -201,7 +199,6 @@ Item {
201199
202200 onAppActivated: {
203201 menuModel.activate(menuIndex, true);
204− shell.hideIndicatorMenu(UbuntuAnimation.FastDuration);
205202 }
206203 onDismissed: {
207204 menuModel.activate(menuIndex, false);
qml/Panel/Panel.qml−22
@@ -31,28 +31,6 @@ Item {
3131
3232 signal searchClicked
3333
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−
5634 PanelBackground {
5735 id: panelBackground
5836 anchors {
qml/Shell.qml−4
@@ -472,10 +472,6 @@ FocusScope {
472472 stages.hide()
473473 }
474474
475− function hideIndicatorMenu(delay) {
476− panel.hideIndicatorMenu(delay);
477− }
478−
479475 Item {
480476 id: overlay
481477
tests/qmltests/Panel/tst_Panel.qml−14
@@ -268,19 +268,5 @@ Item {
268268
269269 compare(indicatorRow.currentItem, indicatorItemFirst, "First indicator should still be the current item");
270270 }
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− }
285271 }
286272}