Display gallery loading and failure placeholders in the image viewer

This commit is contained in:
evgeny committed 2026-10-06 19:57:32 +02:00
1 parent c36fd3bfc8
commit fad96603a7
2 files changed
+4 -1

No files matched your search

+2 -1
View File
@@ -131,7 +131,8 @@ void ImageViewerWindow::paintEvent(QPaintEvent*) {
if (m_image.isNull()) {
p.setPen(QColor(150, 150, 150));
p.drawText(rect(), Qt::AlignCenter, QCoreApplication::translate("ChatGui", "Failed to load photo"));
p.drawText(rect(), Qt::AlignCenter, m_placeholder.isEmpty() ?
QCoreApplication::translate("ChatGui", "Failed to load photo") : m_placeholder);
return;
}