Allow avatar galleries to display validated cached images
This commit is contained in:
1 parent
ccae89fb60
commit
4134200b4e
2 files changed
+5
No files matched your search
@@ -108,6 +108,10 @@ void ImageViewerWindow::resetView() {
|
||||
m_dragging = false;
|
||||
}
|
||||
|
||||
void ImageViewerWindow::loadImage(const QImage& image) {
|
||||
m_image = QPixmap::fromImage(image); resetView(); update();
|
||||
}
|
||||
|
||||
void ImageViewerWindow::clampOffset() {
|
||||
if (m_image.isNull()) { m_offset = QPointF(0, 0); return; }
|
||||
double baseW = (double)m_image.width() / width();
|
||||
|
||||
@@ -16,6 +16,7 @@ class ImageViewerWindow : public QWidget {
|
||||
public:
|
||||
explicit ImageViewerWindow(QWidget *parent = nullptr);
|
||||
void loadFile(const QString& path);
|
||||
void loadImage(const QImage& image);
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
|
||||
Reference in new issue
Block a user