view image alt text on hover

This commit is contained in:
ouwou committed 2023-12-13 21:59:45 -05:00
1 parent 260fc2a745
commit 23bf237e4e
4 files changed
+12 -3

No files matched your search

+3
View File
@@ -46,6 +46,9 @@ ChatMessageItemContainer *ChatMessageItemContainer::FromMessage(const Message &d
for (const auto &a : data.Attachments) {
if (IsURLViewableImage(a.ProxyURL) && a.Width.has_value() && a.Height.has_value()) {
auto *widget = container->CreateImageComponent(a.ProxyURL, a.URL, *a.Width, *a.Height);
if (a.Description.has_value()) {
widget->set_tooltip_text(*a.Description);
}
container->m_main.add(*widget);
} else {
auto *widget = container->CreateAttachmentComponent(a);