mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 21:10:01 -08:00
Added option in chat settings
This commit is contained in:
parent
d5c8f45ab9
commit
0aef6ecc94
5 changed files with 25 additions and 3 deletions
|
|
@ -133,9 +133,11 @@ 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());
|
||||
if (settingsCache->getShowBuddyIcon()) {
|
||||
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