summary refs log tree commit diff
path: root/src/MxcImageProvider.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-08-14 17:17:50 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-08-14 17:17:50 +0200
commit42d2b10d5d53ecc92531491fdf2e27399da08d84 (patch)
tree951bcf1a6e527e3a6341d8dea0c912a5e39fea00 /src/MxcImageProvider.h
parentTab to move down completer (diff)
downloadnheko-42d2b10d5d53ecc92531491fdf2e27399da08d84.tar.xz
Round images in the image provider
Diffstat (limited to '')
-rw-r--r--src/MxcImageProvider.h7
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;