@@ -82,9 +82,10 @@ FocusScope {
83 inputMethodHints: root.isAlphanumeric ? Qt.ImhNone : Qt.ImhDigitsOnly
83 inputMethodHints: root.isAlphanumeric ? Qt.ImhNone : Qt.ImhDigitsOnly
84 echoMode: root.isSecret ? TextInput.Password : TextInput.Normal
84 echoMode: root.isSecret ? TextInput.Password : TextInput.Normal
85− placeholderText: " " + root.text // add some spacing here
86 hasClearButton: false
85 hasClearButton: false
87+ readonly property real frameSpacing: units.gu(0.5)
88 style: Item {
89 style: Item {
89 property color color: d.textColor
90 property color color: d.textColor
90 property color selectedTextColor: d.selectedColor
91 property color selectedTextColor: d.selectedColor
@@ -92,12 +93,13 @@ FocusScope {
92 property color borderColor: "transparent"
93 property color borderColor: "transparent"
93 property color backgroundColor: "transparent"
94 property color backgroundColor: "transparent"
94 property color errorColor: d.errorColor
95 property color errorColor: d.errorColor
95− property real frameSpacing: units.gu(0.5)
96+ property real frameSpacing: passwordInput.frameSpacing
96 anchors.fill: parent
97 anchors.fill: parent
99 secondaryItem: [
100 secondaryItem: [
101 name: "keyboard-caps-enabled"
103 name: "keyboard-caps-enabled"
102 height: units.gu(3)
104 height: units.gu(3)
103 width: units.gu(3)
105 width: units.gu(3)
@@ -124,5 +126,25 @@ FocusScope {
130+ // We use our own custom placeholder label instead of the standard
131+ // TextField one because the standard one hardcodes baseText as the
132+ // palette color, whereas we want raisedSecondaryText.
138+ verticalCenter: parent.verticalCenter
139+ leftMargin: units.gu(1.5)
140+ rightMargin: anchors.leftMargin +
141+ (capsIcon.visible ? capsIcon.width + passwordInput.frameSpacing
145+ visible: passwordInput.text == "" && !passwordInput.inputMethodComposing
146+ color: theme.palette.normal.raisedSecondaryText
147+ elide: Text.ElideRight