read-receipts-list: Add a border between avatars

Uses a round cutout rather than a border to have a better visual
if part of the avatar is transparent.
This commit is contained in:
Kévin Commaille 2023-11-02 17:26:33 +01:00
parent 0c652f24d9
commit f11c1fd6d7
No known key found for this signature in database
GPG Key ID: 29A48C1F03620416
2 changed files with 10 additions and 1 deletions

View File

@ -505,6 +505,12 @@ message-reactions .reaction-count {
padding: 2px;
}
read-receipts-list .cutout {
background-color: @view_bg_color;
border-radius: 999px;
padding: 1px;
}
.divider-row {
font-size: 0.9em;
font-weight: bold;

View File

@ -41,6 +41,7 @@ mod imp {
fn class_init(klass: &mut Self::Class) {
Self::bind_template(klass);
klass.set_css_name("read-receipts-list");
}
fn instance_init(obj: &InitializingObject<Self>) {
@ -112,7 +113,9 @@ impl ReadReceiptsList {
let avatar = Avatar::new();
avatar.set_size(20);
avatar.set_data(Some(avatar_data.clone()));
avatar.upcast()
let cutout = adw::Bin::builder().child(&avatar).css_classes(["cutout"]).build();
cutout.upcast()
}),
);