diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-08-14 17:17:50 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-08-14 17:17:50 +0200 |
commit | 42d2b10d5d53ecc92531491fdf2e27399da08d84 (patch) | |
tree | 951bcf1a6e527e3a6341d8dea0c912a5e39fea00 /src/MxcImageProvider.h | |
parent | Tab to move down completer (diff) | |
download | nheko-42d2b10d5d53ecc92531491fdf2e27399da08d84.tar.xz |
Round images in the image provider
Diffstat (limited to '')
-rw-r--r-- | src/MxcImageProvider.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/MxcImageProvider.h b/src/MxcImageProvider.h index 61d82852..6de83c0e 100644 --- a/src/MxcImageProvider.h +++ b/src/MxcImageProvider.h @@ -19,10 +19,11 @@ class MxcImageResponse , public QRunnable { public: - MxcImageResponse(const QString &id, bool crop, const QSize &requestedSize) + MxcImageResponse(const QString &id, bool crop, double radius, const QSize &requestedSize) : m_id(id) , m_requestedSize(requestedSize) , m_crop(crop) + , m_radius(radius) { setAutoDelete(false); } @@ -39,6 +40,7 @@ public: QSize m_requestedSize; QImage m_image; bool m_crop; + double m_radius; }; class MxcImageProvider @@ -54,7 +56,8 @@ public slots: static void download(const QString &id, const QSize &requestedSize, std::function<void(QString, QSize, QImage, QString)> then, - bool crop = true); + bool crop = true, + double radius = 0); private: QThreadPool pool; |