aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalte Brandy <malte.brandy@maralorn.de>2016-10-25 23:55:29 +0200
committerMalte Brandy <malte.brandy@maralorn.de>2016-10-26 00:39:00 +0200
commitd350174d10eafb2dfc85bac93bf59ff9f218c61b (patch)
tree4295dad796d9fcf38179d72761f2482dc727cde3
parent27b25141e02c32b1e53a25e82b579e6a3d8089c9 (diff)
downloadlibquotient-d350174d10eafb2dfc85bac93bf59ff9f218c61b.tar.gz
libquotient-d350174d10eafb2dfc85bac93bf59ff9f218c61b.zip
Introduce cropedAvatar
-rw-r--r--user.cpp5
-rw-r--r--user.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/user.cpp b/user.cpp
index f6256a19..7d5024e5 100644
--- a/user.cpp
+++ b/user.cpp
@@ -81,6 +81,11 @@ QString User::displayname() const
QPixmap User::avatar(int width, int height)
{
+ return croppedAvatar(width, height); // FIXME: Return an uncropped avatar;
+}
+
+QPixmap User::croppedAvatar(int width, int height)
+{
QSize size(width, height);
if( !d->avatarValid
diff --git a/user.h b/user.h
index 33a89e0b..c408eb67 100644
--- a/user.h
+++ b/user.h
@@ -49,6 +49,7 @@ namespace QMatrixClient
Q_INVOKABLE QString displayname() const;
QPixmap avatar(int requestedWidth, int requestedHeight);
+ QPixmap croppedAvatar(int requestedWidth, int requestedHeight);
void processEvent(Event* event);