Display gallery loading and failure placeholders in the image viewer
This commit is contained in:
1 parent
c36fd3bfc8
commit
fad96603a7
2 files changed
+4
-1
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user