on xenial help sign in
Some fixes to Lockscreen that make it easier to use from the welcome wizard
da6e066Michael Terry
qml/Components/Lockscreen.qml+14−9
@@ -24,6 +24,12 @@ Showable {
24 // Determine if a numeric or alphanumeric pad is used.
24 // Determine if a numeric or alphanumeric pad is used.
25 property bool alphaNumeric: false
25 property bool alphaNumeric: false
26
26
27+ // Whether to show an emergency call button
28+ property bool showEmergencyCallButton: true
29+
30+ // Whether to show a cancel button (not all lockscreen types normally do anyway)
31+ property bool showCancelButton: true
32+
27 // Informational text. (e.g. some text to tell which domain this is pin is entered for)
33 // Informational text. (e.g. some text to tell which domain this is pin is entered for)
28 property string infoText: ""
34 property string infoText: ""
29
35
@@ -89,10 +95,11 @@ Showable {
89 }
95 }
90
96
91 Rectangle {
97 Rectangle {
92− // In case background fails to load or is undefined
98+ // In case background fails to load
93 id: backgroundBackup
99 id: backgroundBackup
94 anchors.fill: parent
100 anchors.fill: parent
95 color: "black"
101 color: "black"
102+ visible: root.background.toString() !== ""
96 }
103 }
97
104
98 Image {
105 Image {
@@ -182,20 +189,18 @@ Showable {
182 property: "entryEnabled"
189 property: "entryEnabled"
183 value: !pinPadLoader.waiting && !forcedDelayTimer.running
190 value: !pinPadLoader.waiting && !forcedDelayTimer.running
184 }
191 }
192+ Binding {
193+ target: pinPadLoader.item
194+ property: "showCancelButton"
195+ value: root.showCancelButton
196+ }
185 }
197 }
186
198
187 Label {
199 Label {
188 id: emergencyCallLabel
200 id: emergencyCallLabel
189 objectName: "emergencyCallLabel"
201 objectName: "emergencyCallLabel"
190
202
191− // FIXME: We *should* show emergency dialer if there is a SIM present,
203+ visible: showEmergencyCallButton
192− // regardless of whether the side stage is enabled. But right now,
193− // the assumption is that narrow screens are phones which have SIMs
194− // and wider screens are tablets which don't. When we do allow this
195− // on devices with a side stage and a SIM, work should be done to
196− // ensure that the main stage is disabled while the dialer is present
197− // in the side stage.
198− visible: !shell.sideStageEnabled
199
204
200 anchors {
205 anchors {
201 bottom: parent.bottom
206 bottom: parent.bottom
qml/Components/PinLockscreen.qml+2
@@ -31,6 +31,7 @@ Column {
31 property int padHeight: units.gu(28)
31 property int padHeight: units.gu(28)
32 property int minPinLength: -1
32 property int minPinLength: -1
33 property int maxPinLength: -1
33 property int maxPinLength: -1
34+ property bool showCancelButton: true
34
35
35 signal entered(string passphrase)
36 signal entered(string passphrase)
36 signal cancel()
37 signal cancel()
@@ -197,6 +198,7 @@ Column {
197 width: numbersGrid.buttonWidth
198 width: numbersGrid.buttonWidth
198
199
199 onClicked: root.cancel()
200 onClicked: root.cancel()
201+ visible: root.showCancelButton
200 }
202 }
201 Item {
203 Item {
202 height: numbersGrid.buttonHeight
204 height: numbersGrid.buttonHeight
qml/Shell.qml+9
@@ -294,6 +294,15 @@ Item {
294 minPinLength: 4
294 minPinLength: 4
295 maxPinLength: 4
295 maxPinLength: 4
296
296
297+ // FIXME: We *should* show emergency dialer if there is a SIM present,
298+ // regardless of whether the side stage is enabled. But right now,
299+ // the assumption is that narrow screens are phones which have SIMs
300+ // and wider screens are tablets which don't. When we do allow this
301+ // on devices with a side stage and a SIM, work should be done to
302+ // ensure that the main stage is disabled while the dialer is present
303+ // in the side stage.
304+ showEmergencyCallButton: !shell.sideStageEnabled
305+
297 onEntered: LightDM.Greeter.respond(passphrase);
306 onEntered: LightDM.Greeter.respond(passphrase);
298 onCancel: greeter.show()
307 onCancel: greeter.show()
299 onEmergencyCall: shell.activateApplication("dialer-app") // will automatically enter fake-active mode
308 onEmergencyCall: shell.activateApplication("dialer-app") // will automatically enter fake-active mode