on xenial help sign in
Quick fix for logging in with a mouse in NarrowView
954a727Michael Terry
qml/Greeter/CoverPage.qml+13−2
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013,2014,2015 Canonical, Ltd.
2+ * Copyright (C) 2013-2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@ Showable {
34 readonly property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
34 readonly property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
35
35
36 signal tease()
36 signal tease()
37+ signal clicked()
37
38
38 function hideRight() {
39 function hideRight() {
39 d.forceRightOnNextHideAnimation = true;
40 d.forceRightOnNextHideAnimation = true;
@@ -55,7 +56,17 @@ Showable {
55 // instead, we can get a little extra horizontal push by using transforms.
56 // instead, we can get a little extra horizontal push by using transforms.
56 transform: Translate { id: translation; x: root.draggable ? launcherOffset : 0 }
57 transform: Translate { id: translation; x: root.draggable ? launcherOffset : 0 }
57
58
59+ // Eat events elsewhere on the coverpage, except mouse clicks which we pass
60+ // up (they are used in the NarrowView to hide the cover page)
61+ MouseArea {
62+ anchors.fill: parent
63+ onClicked: root.clicked()
64+
65+ MultiPointTouchArea {
58− MouseArea { anchors.fill: parent; }
66+ anchors.fill: parent
67+ mouseEnabled: false
68+ }
69+ }
59
70
60 Rectangle {
71 Rectangle {
61 // In case background fails to load
72 // In case background fails to load
qml/Greeter/Infographics.qml+2−1
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2013 Canonical, Ltd.
2+ * Copyright (C) 2013-2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -402,6 +402,7 @@ Item {
402
402
403 MouseArea {
403 MouseArea {
404 anchors.fill: dataCircle
404 anchors.fill: dataCircle
405+ enabled: notification.text != ""
405
406
406 onDoubleClicked: {
407 onDoubleClicked: {
407 if (!d.animating) {
408 if (!d.animating) {
qml/Greeter/NarrowView.qml+2−1
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2015-2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -145,6 +145,7 @@ FocusScope {
145 width: parent.width
145 width: parent.width
146 background: root.background
146 background: root.background
147 onTease: root.tease()
147 onTease: root.tease()
148+ onClicked: hide()
148
149
149 onShowProgressChanged: {
150 onShowProgressChanged: {
150 if (showProgress === 1) {
151 if (showProgress === 1) {