Don't elide UserDelegate text when there's only one item
ClosedPublic

Authored by davidedmundson on Aug 23 2017, 7:58 AM.

Details

Summary

In the lock screen the user delegate has to elide the text when there
are multiple items next to each other, otherwise it will overlap.

When there's only one item (which is quite common) we don't need to
and doing so looks weird.

Test Plan

Modified SDDM dummydata/userModel to have one entry with a long name
and back to multiple entries.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Aug 23 2017, 7:58 AM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 23 2017, 7:58 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added inline comments.
lookandfeel/contents/components/UserDelegate.qml
141

We could also just disable eliding and it will overflow?

lookandfeel/contents/components/UserList.qml
80

Just out of curiosity: why not count?

83

:D

davidedmundson added inline comments.Aug 23 2017, 8:30 AM
lookandfeel/contents/components/UserDelegate.qml
141

Yes, but it would overflow to the right not over the centre.
And if I change the anchor to centre, then I need to set a width.

I could do width: parent.width and then put the ? : on elide.
But it amounts to the same.

lookandfeel/contents/components/UserList.qml
83

Fricking arc. I definitely didn't stage that hunk. Then it kindly goes and adds them back thinking you've accidentally missed them.

broulik accepted this revision.Aug 23 2017, 8:33 AM
This revision is now accepted and ready to land.Aug 23 2017, 8:33 AM
This revision was automatically updated to reflect the committed changes.