1 files changed, 10 insertions, 10 deletions
diff --git a/src/UserInfoWidget.cpp b/src/UserInfoWidget.cpp
index 5345fb2a..7a910340 100644
--- a/src/UserInfoWidget.cpp
+++ b/src/UserInfoWidget.cpp
@@ -1,3 +1,4 @@
+
/*
* nheko Copyright (C) 2017 Konstantinos Sideris <siderisk@auth.gr>
*
@@ -52,10 +53,9 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
textLayout_->setSpacing(widgetMargin / 2);
textLayout_->setContentsMargins(widgetMargin * 2, widgetMargin, widgetMargin, widgetMargin);
- userAvatar_ = new Avatar(this);
+ userAvatar_ = new Avatar(this, fontHeight * 2.5);
userAvatar_->setObjectName("userAvatar");
userAvatar_->setLetter(QChar('?'));
- userAvatar_->setSize(fontHeight * 2.5);
QFont nameFont;
nameFont.setPointSizeF(nameFont.pointSizeF() * 1.1);
@@ -135,14 +135,6 @@ UserInfoWidget::reset()
}
void
-UserInfoWidget::setAvatar(const QImage &img)
-{
- avatar_image_ = img;
- userAvatar_->setImage(img);
- update();
-}
-
-void
UserInfoWidget::setDisplayName(const QString &name)
{
if (name.isEmpty())
@@ -160,6 +152,14 @@ UserInfoWidget::setUserId(const QString &userid)
{
user_id_ = userid;
userIdLabel_->setText(userid);
+ update();
+}
+
+void
+UserInfoWidget::setAvatar(const QString &url)
+{
+ userAvatar_->setImage(url);
+ update();
}
void
|