summary refs log tree commit diff
path: root/src/TopRoomBar.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-08-26 01:24:56 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-08-26 08:51:56 +0200
commit52056a79fa94117ce0fc8f388458ceb48cc3be54 (patch)
tree3b9ff5a6466ffa6de1b88e49c9ced87d39df0c74 /src/TopRoomBar.cpp
parentFix SIGNAL SLOT issue on mtx types (diff)
downloadnheko-52056a79fa94117ce0fc8f388458ceb48cc3be54.tar.xz
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();