From f8bd795462b32cae83810f8e0b40b83c11b04ffa Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 30 Dec 2016 17:28:00 +0100 Subject: [PATCH] SiteInfo: Fix showing images with HighDPI --- src/lib/other/siteinfo.cpp | 4 +++- src/lib/other/siteinfo.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/other/siteinfo.cpp b/src/lib/other/siteinfo.cpp index 0e1a595ab..bc02730f8 100644 --- a/src/lib/other/siteinfo.cpp +++ b/src/lib/other/siteinfo.cpp @@ -217,8 +217,10 @@ void SiteInfo::showLoadingText() ui->mediaPreview->setScene(scene); } -void SiteInfo::showPixmap(const QPixmap &pixmap) +void SiteInfo::showPixmap(QPixmap pixmap) { + pixmap.setDevicePixelRatio(devicePixelRatioF()); + delete ui->mediaPreview->scene(); QGraphicsScene* scene = new QGraphicsScene(ui->mediaPreview); diff --git a/src/lib/other/siteinfo.h b/src/lib/other/siteinfo.h index 5462b3683..c7835b51d 100644 --- a/src/lib/other/siteinfo.h +++ b/src/lib/other/siteinfo.h @@ -52,7 +52,7 @@ private slots: private: void showLoadingText(); - void showPixmap(const QPixmap &pixmap); + void showPixmap(QPixmap pixmap); Ui::SiteInfo* ui; CertificateInfoWidget* m_certWidget;