From 29138e0e3af7ce303583b93a41ea4e641dd063b6 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 23 Jun 2015 12:41:46 -0700 Subject: [PATCH] delete button for the pin entry --- shell/contents/views/Pin.qml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/shell/contents/views/Pin.qml b/shell/contents/views/Pin.qml index 1fe59264..028d0294 100644 --- a/shell/contents/views/Pin.qml +++ b/shell/contents/views/Pin.qml @@ -128,12 +128,23 @@ PlasmaCore.ColorScope { text: simManager.pinRetries && simManager.pinRetries[simManager.pinRequired] ? i18n("%1 attempts left", simManager.pinRetries[simManager.pinRequired]) : ""; } - PlasmaComponents.Label { - id: pinLabel + RowLayout { Layout.fillWidth: true - horizontalAlignment: Qt.AlignRight - verticalAlignment: Qt.AlignVCenter - font.pixelSize: one.font.pixelSize + PlasmaComponents.Label { + id: pinLabel + Layout.fillWidth: true + horizontalAlignment: Qt.AlignRight + verticalAlignment: Qt.AlignVCenter + font.pixelSize: one.font.pixelSize + } + PlasmaComponents.Button { + visible: pinLabel.text != "" + iconSource: "edit-clear" + width: height + onClicked: { + pinLabel.text = pinLabel.text.substring(0, pinLabel.text.length - 1); + } + } } Grid {