Add missing update calls

This commit is contained in:
Konstantinos Sideris 2017-09-30 20:43:57 +03:00
parent 2d6bbc70da
commit 748f480077
4 changed files with 8 additions and 0 deletions

View file

@ -125,4 +125,5 @@ inline void
RoomInfoListItem::setDescriptionMessage(const DescInfo &info) RoomInfoListItem::setDescriptionMessage(const DescInfo &info)
{ {
lastMsgInfo_ = info; lastMsgInfo_ = info;
update();
} }

View file

@ -77,12 +77,14 @@ inline void
TopRoomBar::updateRoomAvatar(const QImage &avatar_image) TopRoomBar::updateRoomAvatar(const QImage &avatar_image)
{ {
avatar_->setImage(avatar_image); avatar_->setImage(avatar_image);
update();
} }
inline void inline void
TopRoomBar::updateRoomAvatar(const QIcon &icon) TopRoomBar::updateRoomAvatar(const QIcon &icon)
{ {
avatar_->setIcon(icon); avatar_->setIcon(icon);
update();
} }
inline void inline void
@ -91,6 +93,7 @@ TopRoomBar::updateRoomName(const QString &name)
QString elidedText = QString elidedText =
QFontMetrics(nameLabel_->font()).elidedText(name, Qt::ElideRight, width() * 0.8); QFontMetrics(nameLabel_->font()).elidedText(name, Qt::ElideRight, width() * 0.8);
nameLabel_->setText(elidedText); nameLabel_->setText(elidedText);
update();
} }
inline void inline void
@ -102,4 +105,5 @@ TopRoomBar::updateRoomTopic(QString topic)
QFontMetrics(topicLabel_->font()).elidedText(topic, Qt::ElideRight, width() * 0.6); QFontMetrics(topicLabel_->font()).elidedText(topic, Qt::ElideRight, width() * 0.6);
topicLabel_->setText(topic); topicLabel_->setText(topic);
update();
} }

View file

@ -108,6 +108,7 @@ TopRoomBar::updateRoomAvatarFromName(const QString &name)
letter = name[0]; letter = name[0];
avatar_->setLetter(letter); avatar_->setLetter(letter);
update();
} }
void void

View file

@ -156,6 +156,7 @@ UserInfoWidget::setAvatar(const QImage &img)
{ {
avatar_image_ = img; avatar_image_ = img;
userAvatar_->setImage(img); userAvatar_->setImage(img);
update();
} }
void void
@ -168,6 +169,7 @@ UserInfoWidget::setDisplayName(const QString &name)
displayNameLabel_->setText(display_name_); displayNameLabel_->setText(display_name_);
userAvatar_->setLetter(QChar(display_name_[0])); userAvatar_->setLetter(QChar(display_name_[0]));
update();
} }
void void