on xenial help sign in
Fix greeter label positioning (#194)
f09c0d7Jan Sprinz
qml/Greeter/LoginList.qml+15
@@ -30,6 +30,7 @@ StyledItem {
30 property bool locked
30 property bool locked
31 property bool waiting
31 property bool waiting
32 property alias boxVerticalOffset: highlightItem.y
32 property alias boxVerticalOffset: highlightItem.y
33+ property string _realName
33
34
34 readonly property alias passwordInput: passwordInput
35 readonly property alias passwordInput: passwordInput
35 readonly property int numAboveBelow: 4
36 readonly property int numAboveBelow: 4
@@ -136,6 +137,17 @@ StyledItem {
136 }
137 }
137
138
138 height: root.highlightedHeight
139 height: root.highlightedHeight
140+ Label {
141+ // HACK: Work around https://github.com/ubports/unity8/issues/185
142+ text: _realName ? _realName : LightDMService.greeter.authenticationUser
143+ visible: userList.count == 1
144+ anchors {
145+ left: parent.left
146+ top: parent.top
147+ topMargin: units.gu(2)
148+ leftMargin: units.gu(2)
149+ }
150+ }
139 }
151 }
140
152
141 ListView {
153 ListView {
@@ -193,6 +205,7 @@ StyledItem {
193
205
194 FadingLabel {
206 FadingLabel {
195 objectName: "username" + index
207 objectName: "username" + index
208+ visible: userList.count != 1 // HACK Hide username label until someone sorts out the anchoring with the keyboard-dismiss animation, Work around https://github.com/ubports/unity8/issues/185
196
209
197 anchors {
210 anchors {
198 left: parent.left
211 left: parent.left
@@ -207,6 +220,8 @@ StyledItem {
207 color: userList.currentIndex !== index ? theme.palette.normal.raised
220 color: userList.currentIndex !== index ? theme.palette.normal.raised
208 : theme.palette.normal.raisedText
221 : theme.palette.normal.raisedText
209
222
223+ Component.onCompleted: _realName = realName
224+
210 Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
225 Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
211
226
212 Rectangle {
227 Rectangle {