diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui
index bc74a7634..b32c71465 100644
--- a/retroshare-gui/src/gui/FriendsDialog.ui
+++ b/retroshare-gui/src/gui/FriendsDialog.ui
@@ -151,8 +151,14 @@
0
+
+
+ 96
+ 96
+
+
- false
+ true
@@ -171,7 +177,7 @@
-
+
:/images/edit_16.png:/images/edit_16.png
@@ -264,7 +270,7 @@
-
+
:/images/add_image24.png:/images/add_image24.png
diff --git a/retroshare-gui/src/gui/common/AvatarDialog.cpp b/retroshare-gui/src/gui/common/AvatarDialog.cpp
index 16b832345..8eb24a184 100644
--- a/retroshare-gui/src/gui/common/AvatarDialog.cpp
+++ b/retroshare-gui/src/gui/common/AvatarDialog.cpp
@@ -132,7 +132,7 @@ void AvatarDialog::getAvatar(QPixmap &avatar)
void AvatarDialog::getAvatar(QByteArray &avatar)
{
- const QPixmap *pixmap = ui->avatarLabel->pixmap();
+ pixmap = ui->avatarLabel->extractCroppedScaledPicture();
if (!pixmap) {
avatar.clear();
return;
@@ -141,7 +141,7 @@ void AvatarDialog::getAvatar(QByteArray &avatar)
QBuffer buffer(&avatar);
buffer.open(QIODevice::WriteOnly);
- pixmap->save(&buffer, "PNG"); // writes image into ba in PNG format
+ pixmap.save(&buffer, "PNG"); // writes image into ba in PNG format
}
void AvatarDialog::load()
@@ -331,6 +331,6 @@ void AvatarDialog::addAvatar()
QString sticker = qobject_cast(sender())->statusTip();
QPixmap pixmap(sticker);
- ui->avatarLabel->setPixmap(pixmap);
+ ui->avatarLabel->setPicture(pixmap);
updateInterface();
}
diff --git a/retroshare-gui/src/gui/common/AvatarDialog.h b/retroshare-gui/src/gui/common/AvatarDialog.h
index 7144c11ad..f324fb86d 100644
--- a/retroshare-gui/src/gui/common/AvatarDialog.h
+++ b/retroshare-gui/src/gui/common/AvatarDialog.h
@@ -62,6 +62,7 @@ private slots:
private:
void updateInterface();
+ QPixmap pixmap;
private:
Ui::AvatarDialog *ui;