Changeset View
Changeset View
Standalone View
Standalone View
shell/contents/views/Pin.qml
Show All 14 Lines | |||||
15 | * You should have received a copy of the GNU Library General Public | 15 | * You should have received a copy of the GNU Library General Public | ||
16 | * License along with this program; if not, write to the | 16 | * License along with this program; if not, write to the | ||
17 | * Free Software Foundation, Inc., | 17 | * Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.0 | 21 | import QtQuick 2.0 | ||
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
23 | import QtQuick.Controls 2.5 as Controls | ||||
23 | import org.kde.plasma.core 2.0 as PlasmaCore | 24 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
24 | import org.kde.plasma.components 2.0 as PlasmaComponents | 25 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
25 | import MeeGo.QOfono 0.2 | 26 | import MeeGo.QOfono 0.2 | ||
26 | import "../components" | 27 | import "../components" | ||
27 | 28 | | |||
28 | PlasmaCore.ColorScope { | 29 | PlasmaCore.ColorScope { | ||
29 | id: root | 30 | id: root | ||
30 | 31 | | |||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 125 | PlasmaComponents.Label { | |||
125 | Layout.fillWidth: true | 126 | Layout.fillWidth: true | ||
126 | horizontalAlignment: Qt.AlignHCenter | 127 | horizontalAlignment: Qt.AlignHCenter | ||
127 | verticalAlignment: Qt.AlignVCenter | 128 | verticalAlignment: Qt.AlignVCenter | ||
128 | text: simManager.pinRetries && simManager.pinRetries[simManager.pinRequired] ? i18n("%1 attempts left", simManager.pinRetries[simManager.pinRequired]) : ""; | 129 | text: simManager.pinRetries && simManager.pinRetries[simManager.pinRequired] ? i18n("%1 attempts left", simManager.pinRetries[simManager.pinRequired]) : ""; | ||
129 | } | 130 | } | ||
130 | 131 | | |||
131 | RowLayout { | 132 | RowLayout { | ||
132 | Layout.fillWidth: true | 133 | Layout.fillWidth: true | ||
133 | PlasmaComponents.Label { | 134 | Controls.TextField { | ||
134 | id: pinLabel | 135 | id: pinLabel | ||
136 | readOnly: true | ||||
137 | echoMode: TextInput.Password | ||||
138 | activeFocusOnPress: false | ||||
135 | Layout.fillWidth: true | 139 | Layout.fillWidth: true | ||
136 | horizontalAlignment: Qt.AlignRight | 140 | horizontalAlignment: Qt.AlignRight | ||
137 | verticalAlignment: Qt.AlignVCenter | 141 | verticalAlignment: Qt.AlignVCenter | ||
138 | font.pixelSize: one.font.pixelSize | | |||
139 | } | 142 | } | ||
140 | PlasmaComponents.Button { | 143 | PlasmaComponents.Button { | ||
141 | visible: pinLabel.text != "" | 144 | visible: pinLabel.text != "" | ||
142 | iconSource: "edit-clear" | 145 | iconSource: "edit-clear" | ||
143 | width: height | 146 | width: height | ||
144 | onClicked: { | 147 | onClicked: { | ||
145 | pinLabel.text = pinLabel.text.substring(0, pinLabel.text.length - 1); | 148 | pinLabel.text = pinLabel.text.substring(0, pinLabel.text.length - 1); | ||
146 | } | 149 | } | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |