on xenial help sign in
Merge from passphrase-ui-tweaks
commit0fc2b58bbb32e6fc422184a96c2ac751ab79993f authorMichael Terry <michael.terry@canonical.com> dateThu 25 Sep 2014, 10:24 (12 years ago) parent18209eb162c50f
1 file changed+23
qml/Components/PassphraseLockscreen.qml+23
qml/Components/PassphraseLockscreen.qml+23
@@ -91,6 +91,11 @@ Item {
9191 }
9292 clip: true
9393
94+ // This is so that we can draw our own dots, for we want
95+ // complete control over the pixel sizes. (The ubuntu font
96+ // has oddly sized password characters that don't scale right)
97+ opacity: 0
98+
9499 // simulate being disabled, but without removing OSK focus
95100 maximumLength: root.entryEnabled ? 32767 : length
96101
@@ -103,6 +108,24 @@ Item {
103108 }
104109 }
105110
111+ Row {
112+ id: dotRow
113+ anchors.centerIn: entryContainer
114+
115+ property real dotSize: Math.min(units.gu(2), entryContainer.width / pinentryField.length)
116+ spacing: Math.min(units.gu(2), Math.max(0, (entryContainer.width / pinentryField.length) - dotSize))
117+
118+ Repeater {
119+ model: pinentryField.length
120+ delegate: Rectangle {
121+ color: "#f3f3e7"
122+ width: dotRow.dotSize
123+ height: width
124+ radius: width / 2
125+ }
126+ }
127+ }
128+
106129 Label {
107130 id: wrongNoticeLabel
108131 objectName: "wrongNoticeLabel"