mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 21:10:01 -08:00
Added buddy stars to chat
This commit is contained in:
parent
b06b81895b
commit
d5c8f45ab9
5 changed files with 85 additions and 0 deletions
|
|
@ -133,6 +133,9 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
|||
if (!sender.isEmpty()) {
|
||||
const int pixelSize = QFontInfo(cursor.charFormat().font()).pixelSize();
|
||||
cursor.insertImage(UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel).toImage(), QString::number(pixelSize) + "_" + QString::number((int) userLevel));
|
||||
QMap<QString, UserListTWI *> buddyList = tabSupervisor->getUserListsTab()->getBuddyList()->getUsers();
|
||||
if (buddyList.contains(sender))
|
||||
cursor.insertImage(PixmapGenerator::generatePixmap(pixelSize, ":/resources/buddy_icon.svg").toImage());
|
||||
cursor.insertText(" ");
|
||||
}
|
||||
cursor.setCharFormat(senderFormat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue