on xenial help sign in
Remove the background dimming when the launcher is revealed by a drag Fixes: #1575137

Approved by: Vesa Rautiainen, Lukáš Tinkl

commitf87ef564b78c5ab24b53364b57bf6d911d4739e4 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 27 May 2016, 13:53 (10 years ago) parent1da77ea10365a3
2 files changed+24−20
qml/Launcher/Launcher.qml+12−20 tests/qmltests/Launcher/tst_Launcher.qml+12
qml/Launcher/Launcher.qml+12−20
@@ -273,6 +273,18 @@ FocusScope {
273273 }
274274 }
275275
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+
276288 MouseArea {
277289 id: launcherDragArea
278290 enabled: root.available && (root.state == "visible" || root.state == "visibleTemporary") && !root.lockedVisible
@@ -293,26 +305,6 @@ FocusScope {
293305 }
294306 }
295307
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−
316308 EdgeBarrier {
317309 id: edgeBarrier
318310 edge: Qt.LeftEdge
tests/qmltests/Launcher/tst_Launcher.qml+12
@@ -34,6 +34,14 @@ Rectangle {
3434
3535 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
3636
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+
3745 Loader {
3846 id: launcherLoader
3947 anchors.fill: parent
@@ -836,16 +844,20 @@ Rectangle {
836844 dragLauncherIntoView();
837845 verify(launcher.state == "visible");
838846
847+ clickThroughTester.pressCount = 0;
839848 mouseClick(root, root.width / 2, units.gu(1));
840849 waitUntilLauncherDisappears();
841850 verify(launcher.state == "");
851+ compare(clickThroughTester.pressCount, 1);
842852
843853 // and repeat, as a test for regression in lpbug#1531339
844854 dragLauncherIntoView();
845855 verify(launcher.state == "visible");
856+ clickThroughTester.pressCount = 0;
846857 mouseClick(root, root.width / 2, units.gu(1));
847858 waitUntilLauncherDisappears();
848859 verify(launcher.state == "");
860+ compare(clickThroughTester.pressCount, 1);
849861 }
850862
851863 function test_quicklist_positioning_data() {