on xenial help sign in
remove the darkening layer for the launcher when it's opened by drag
commit8b885b1d18d14a044296f6c4e1cb78964147d045 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 3 May 2016, 17:52 (10 years ago) parentcce8634
2 files changed+16−10
qml/Launcher/Launcher.qml+2−10 tests/qmltests/Launcher/tst_Launcher.qml+14
qml/Launcher/Launcher.qml+2−10
@@ -299,20 +299,12 @@ FocusScope {
299299 enabled: root.state == "visible" && (!root.lockedVisible || panel.highlightIndex >= -1)
300300 visible: enabled
301301 onPressed: {
302− panel.highlightIndex = -2
302+ mouse.accepted = false;
303+ panel.highlightIndex = -2;
303304 root.hide();
304305 }
305306 }
306307
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+14
@@ -34,6 +34,11 @@ Rectangle {
3434
3535 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
3636
37+ MouseArea {
38+ id: clickThroughTester
39+ anchors.fill: parent
40+ }
41+
3742 Loader {
3843 id: launcherLoader
3944 anchors.fill: parent
@@ -202,6 +207,12 @@ Rectangle {
202207 target: LauncherModel
203208 }
204209
210+ SignalSpy {
211+ id: clickThroughSpy
212+ target: clickThroughTester
213+ signalName: "clicked"
214+ }
215+
205216 Item {
206217 id: fakeDismissTimer
207218 property bool running: false
@@ -835,10 +846,12 @@ Rectangle {
835846 function test_launcher_dismiss() {
836847 dragLauncherIntoView();
837848 verify(launcher.state == "visible");
849+ clickThroughSpy.clear();
838850
839851 mouseClick(root, root.width / 2, units.gu(1));
840852 waitUntilLauncherDisappears();
841853 verify(launcher.state == "");
854+ verify(clickThroughSpy.count, 1);
842855
843856 // and repeat, as a test for regression in lpbug#1531339
844857 dragLauncherIntoView();
@@ -846,6 +859,7 @@ Rectangle {
846859 mouseClick(root, root.width / 2, units.gu(1));
847860 waitUntilLauncherDisappears();
848861 verify(launcher.state == "");
862+ verify(clickThroughSpy.count, 2);
849863 }
850864
851865 function test_quicklist_positioning_data() {