on xenial help sign in
Some fixes to Lockscreen that make it easier to use from the welcome wizard
commitda6e066f06cfe4d50e216eff0aad9fca767a7553 authorMichael Terry <michael.terry@canonical.com> dateTue 23 Sep 2014, 09:08 (12 years ago) parentff9936d
3 files changed+25−9
qml/Components/Lockscreen.qml+14−9 qml/Components/PinLockscreen.qml+2 qml/Shell.qml+9
qml/Components/Lockscreen.qml+14−9
@@ -24,6 +24,12 @@ Showable {
2424 // Determine if a numeric or alphanumeric pad is used.
2525 property bool alphaNumeric: false
2626
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+
2733 // Informational text. (e.g. some text to tell which domain this is pin is entered for)
2834 property string infoText: ""
2935
@@ -89,10 +95,11 @@ Showable {
8995 }
9096
9197 Rectangle {
92− // In case background fails to load or is undefined
98+ // In case background fails to load
9399 id: backgroundBackup
94100 anchors.fill: parent
95101 color: "black"
102+ visible: root.background.toString() !== ""
96103 }
97104
98105 Image {
@@ -182,20 +189,18 @@ Showable {
182189 property: "entryEnabled"
183190 value: !pinPadLoader.waiting && !forcedDelayTimer.running
184191 }
192+ Binding {
193+ target: pinPadLoader.item
194+ property: "showCancelButton"
195+ value: root.showCancelButton
196+ }
185197 }
186198
187199 Label {
188200 id: emergencyCallLabel
189201 objectName: "emergencyCallLabel"
190202
191− // FIXME: We *should* show emergency dialer if there is a SIM present,
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
203+ visible: showEmergencyCallButton
199204
200205 anchors {
201206 bottom: parent.bottom
qml/Components/PinLockscreen.qml+2
@@ -31,6 +31,7 @@ Column {
3131 property int padHeight: units.gu(28)
3232 property int minPinLength: -1
3333 property int maxPinLength: -1
34+ property bool showCancelButton: true
3435
3536 signal entered(string passphrase)
3637 signal cancel()
@@ -197,6 +198,7 @@ Column {
197198 width: numbersGrid.buttonWidth
198199
199200 onClicked: root.cancel()
201+ visible: root.showCancelButton
200202 }
201203 Item {
202204 height: numbersGrid.buttonHeight
qml/Shell.qml+9
@@ -294,6 +294,15 @@ Item {
294294 minPinLength: 4
295295 maxPinLength: 4
296296
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+
297306 onEntered: LightDM.Greeter.respond(passphrase);
298307 onCancel: greeter.show()
299308 onEmergencyCall: shell.activateApplication("dialer-app") // will automatically enter fake-active mode