From 42d2b10d5d53ecc92531491fdf2e27399da08d84 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 14 Aug 2021 17:17:50 +0200 Subject: Round images in the image provider --- src/MxcImageProvider.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/MxcImageProvider.h') 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 then, - bool crop = true); + bool crop = true, + double radius = 0); private: QThreadPool pool; -- cgit 1.5.1