Files
flare/data/resources/ui/components/attachment_file.blp

36 lines
762 B
Plaintext

using Gtk 4.0;
using Adw 1;
template $FlAttachmentFile : $FlAttachmentBase {
Box box_file {
Button {
styles [
"circular",
]
margin-end: 6;
clicked => $download() swapped;
valign: center;
icon-name: "document-save-symbolic";
}
Box {
orientation: vertical;
Label {
halign: start;
ellipsize: end;
label: bind template.attachment as <$FlAttachmentObject>.name;
}
Label {
styles [
"dim-label",
"caption",
"numeric",
]
halign: start;
label: bind $format_size(template.attachment as <$FlAttachmentObject>.size) as <string>;
}
}
}
}