Avatar Improvements
This series of commits fixes issues and adds minor improvements I found needed while developing Murmur.
Commit One - Add primary/secondary action to Avatar
This is what it says on the tin.
Kirigami.Avatar {
actions {
main: Kirigami.Action {
text: "yeet"
iconName: "edit-delete"
}
secondary: Kirigami.Action {
text: "yeet"
iconName: "list-add"
}
}
}
The primary action will manifest as the avatar being clickable, while the secondary action will manifest as a desktop-only... thing? that appears when you hover over the avatar, mirroring the style of Telegram Desktop's secondary actions on its avatars.
Commit Two - Adjust techniques used for circular shape
This simplifies the code substantially, and incidentally also reduces the jaggedness of the edges.
Before:
(notice the slight pink rim around the border)
After:
(notice the pink rim is absent)
Commit Three - Adjust sizing of text
This makes the text resize based off of the size of the avatar, as the the text is always either too big or too small otherwise.
Before:
After:
Commit Four - Make image mode set sourceSize
This trims down RAM usage per image (kinda important for Murmur given that I have a hard ceiling of 100MB usage in normal operation for it as a goal, and I can't be wasting it on 2MB apiece avatar images), and incidentally also makes the image crisper in some scenarios.
Commit Five - Increase padding of icon fallback
This makes the icon fallback of the Avatar slightly more padded, which IMO is an improvement to its appearance.
Before:
After:
Commit Six - Make avatar accessible
This too, is what it says on the tin.