on xenial help sign in
Remove the background dimming when the launcher is revealed by a drag Fixes: #1575137
f87ef56Michael Zanetti
qml/Launcher/Launcher.qml+12−20
@@ -273,6 +273,18 @@ FocusScope {
273 }
273 }
274 }
274 }
275
275
276+ InverseMouseArea {
277+ id: closeMouseArea
278+ anchors.fill: panel
279+ enabled: root.state == "visible" && (!root.lockedVisible || panel.highlightIndex >= -1)
280+ visible: enabled
281+ onPressed: {
282+ mouse.accepted = false;
283+ panel.highlightIndex = -2;
284+ root.hide();
285+ }
286+ }
287+
276 MouseArea {
288 MouseArea {
277 id: launcherDragArea
289 id: launcherDragArea
278 enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary") && !root.lockedVisible
290 enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary") && !root.lockedVisible
@@ -293,26 +305,6 @@ FocusScope {
293 }
305 }
294 }
306 }
295
307
296− InverseMouseArea {
297− id: closeMouseArea
298− anchors.fill: panel
299− enabled: root.state == "visible" && (!root.lockedVisible || panel.highlightIndex >= -1)
300− visible: enabled
301− onPressed: {
302− panel.highlightIndex = -2
303− root.hide();
304− }
305− }
306−
307− Rectangle {
308− id: backgroundShade
309− anchors.fill: parent
310− color: "black"
311− opacity: root.state == "visible" && !root.lockedVisible ? 0.6 : 0
312−
313− Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.BriskDuration } }
314− }
315−
316 EdgeBarrier {
308 EdgeBarrier {
317 id: edgeBarrier
309 id: edgeBarrier
318 edge: Qt.LeftEdge
310 edge: Qt.LeftEdge
tests/qmltests/Launcher/tst_Launcher.qml+12
@@ -34,6 +34,14 @@ Rectangle {
34
34
35 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
35 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
36
36
37+ MouseArea {
38+ id: clickThroughTester
39+ anchors.fill: parent
40+ // SignalSpy does not seem to want to connect to the pressed signal. let's count them ourselves.
41+ property int pressCount: 0
42+ onPressed: pressCount++;
43+ }
44+
37 Loader {
45 Loader {
38 id: launcherLoader
46 id: launcherLoader
39 anchors.fill: parent
47 anchors.fill: parent
@@ -836,16 +844,20 @@ Rectangle {
836 dragLauncherIntoView();
844 dragLauncherIntoView();
837 verify(launcher.state == "visible");
845 verify(launcher.state == "visible");
838
846
847+ clickThroughTester.pressCount = 0;
839 mouseClick(root, root.width / 2, units.gu(1));
848 mouseClick(root, root.width / 2, units.gu(1));
840 waitUntilLauncherDisappears();
849 waitUntilLauncherDisappears();
841 verify(launcher.state == "");
850 verify(launcher.state == "");
851+ compare(clickThroughTester.pressCount, 1);
842
852
843 // and repeat, as a test for regression in lpbug#1531339
853 // and repeat, as a test for regression in lpbug#1531339
844 dragLauncherIntoView();
854 dragLauncherIntoView();
845 verify(launcher.state == "visible");
855 verify(launcher.state == "visible");
856+ clickThroughTester.pressCount = 0;
846 mouseClick(root, root.width / 2, units.gu(1));
857 mouseClick(root, root.width / 2, units.gu(1));
847 waitUntilLauncherDisappears();
858 waitUntilLauncherDisappears();
848 verify(launcher.state == "");
859 verify(launcher.state == "");
860+ compare(clickThroughTester.pressCount, 1);
849 }
861 }
850
862
851 function test_quicklist_positioning_data() {
863 function test_quicklist_positioning_data() {