@@ -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