Sprint 6: User List with Avatars
Goal: Display available users with circular avatars for quick selection, allowing click-to-login workflow.
Completed Features
Avatar Loading
- Searches standard avatar locations:
~/.face(freedesktop standard)~/.face.icon~/.face.png~/.config/face.png/var/lib/AccountsService/icons/<username>
- Image processing:
- Center crop to square
- Scale with Lanczos3 filter for quality
- RGBA to BGRA conversion for Cairo
- Caching to avoid reloading
Fallback Avatars
- Colored circle with user initials
- Hue derived from username hash for consistency
- First + last initial for full names, single initial for usernames
User List Widget
- Horizontal row positioned above login form
- Circular avatar rendering with clipping
- Username/first name displayed below avatar
- Hover effect: semi-transparent highlight background
- Selection effect: blue ring around avatar
- Click behavior:
- Populates username field
- Clears password field
- Focuses password field
- Clears any error messages
Files Added
gardm-greeter/src/avatar.rs- Avatar loading and renderinggardm-greeter/src/widgets/user_list.rs- User list widget
IPC Integration
- Uses
ListUsersrequest to get available users - User info includes: name, full_name, home directory, avatar path
View source
| 1 | # Sprint 6: User List with Avatars |
| 2 | |
| 3 | **Goal:** Display available users with circular avatars for quick selection, allowing click-to-login workflow. |
| 4 | |
| 5 | ## Completed Features |
| 6 | |
| 7 | ### Avatar Loading |
| 8 | - Searches standard avatar locations: |
| 9 | - `~/.face` (freedesktop standard) |
| 10 | - `~/.face.icon` |
| 11 | - `~/.face.png` |
| 12 | - `~/.config/face.png` |
| 13 | - `/var/lib/AccountsService/icons/<username>` |
| 14 | - Image processing: |
| 15 | - Center crop to square |
| 16 | - Scale with Lanczos3 filter for quality |
| 17 | - RGBA to BGRA conversion for Cairo |
| 18 | - Caching to avoid reloading |
| 19 | |
| 20 | ### Fallback Avatars |
| 21 | - Colored circle with user initials |
| 22 | - Hue derived from username hash for consistency |
| 23 | - First + last initial for full names, single initial for usernames |
| 24 | |
| 25 | ### User List Widget |
| 26 | - Horizontal row positioned above login form |
| 27 | - Circular avatar rendering with clipping |
| 28 | - Username/first name displayed below avatar |
| 29 | - Hover effect: semi-transparent highlight background |
| 30 | - Selection effect: blue ring around avatar |
| 31 | - Click behavior: |
| 32 | - Populates username field |
| 33 | - Clears password field |
| 34 | - Focuses password field |
| 35 | - Clears any error messages |
| 36 | |
| 37 | ## Files Added |
| 38 | - `gardm-greeter/src/avatar.rs` - Avatar loading and rendering |
| 39 | - `gardm-greeter/src/widgets/user_list.rs` - User list widget |
| 40 | |
| 41 | ## IPC Integration |
| 42 | - Uses `ListUsers` request to get available users |
| 43 | - User info includes: name, full_name, home directory, avatar path |