mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Buddy stars
Buddies will now be seen as stars in the chat
This commit is contained in:
parent
6d4716b38f
commit
d57a6111aa
12 changed files with 409 additions and 12 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <QMouseEvent>
|
||||
#include <QDesktopServices>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include "chatview.h"
|
||||
#include "user_level.h"
|
||||
#include "user_context_menu.h"
|
||||
|
|
@ -130,7 +131,8 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
|||
if (!sameSender) {
|
||||
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();
|
||||
cursor.insertImage(UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel, buddyList.contains(sender)).toImage());
|
||||
cursor.insertText(" ");
|
||||
}
|
||||
cursor.setCharFormat(senderFormat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue