summary refs log tree commit diff
path: root/src/TopRoomBar.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2019-08-30 23:15:09 +0000
committerGitHub <noreply@github.com>2019-08-30 23:15:09 +0000
commit5be967fb1df73fa495f9336f60fd409a011ff4ec (patch)
treeb42e8bd533279f428de3791ae5bab953137e7add /src/TopRoomBar.cpp
parentFix themeing issues on mentions (diff)
parentFix usage of deprecated find (diff)
downloadnheko-5be967fb1df73fa495f9336f60fd409a011ff4ec.tar.xz
Merge pull request #86 from Nheko-Reborn/avatar-memory-usage
Try to reduce memory usage by reusing avatar pixmaps
Diffstat (limited to 'src/TopRoomBar.cpp')
-rw-r--r--src/TopRoomBar.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/TopRoomBar.cpp b/src/TopRoomBar.cpp

index a8049e3a..712fe9aa 100644 --- a/src/TopRoomBar.cpp +++ b/src/TopRoomBar.cpp
@@ -46,9 +46,8 @@ TopRoomBar::TopRoomBar(QWidget *parent) topLayout_->setContentsMargins( 2 * widgetMargin, widgetMargin, 2 * widgetMargin, widgetMargin); - avatar_ = new Avatar(this); + avatar_ = new Avatar(this, fontHeight * 2); avatar_->setLetter(""); - avatar_->setSize(fontHeight * 2); textLayout_ = new QVBoxLayout(); textLayout_->setSpacing(0); @@ -183,7 +182,7 @@ TopRoomBar::reset() } void -TopRoomBar::updateRoomAvatar(const QImage &avatar_image) +TopRoomBar::updateRoomAvatar(const QString &avatar_image) { avatar_->setImage(avatar_image); update();