kcms/users: improve UI for the case where no real name is set

Currently the title of the list item is blank, leaving an awkward
subtitle with nothing above it. This commit improves that to use the
username as the title and avoid setting the subtitle at all, in the case
where the user has not provided their real name.

BUG: 441821
FIXED-IN: 5.23
wilder-5.24
Nate Graham 5 years ago committed by Devin Lin
parent 2b67711736
commit 74e0af62a7
  1. 7
      kcms/users/package/contents/ui/main.qml

@ -56,8 +56,9 @@ KCM.ScrollViewKCM {
}
delegate: Kirigami.BasicListItem {
text: model.display
subtitle: model.name
text: model.display ? model.display : model.name
subtitle: model.display ? model.name : ""
reserveSpaceForSubtitle: true
highlighted: index == userList.currentIndex
@ -80,7 +81,7 @@ KCM.ScrollViewKCM {
Kirigami.Avatar {
source: model.decoration + '?' + avatarVersion // force reload after saving
cache: false // avoid caching
name: model.display
name: model.display ? model.display : model.name
anchors {
fill: parent
margins: 1

Loading…
Cancel
Save