Add custom server-side pawn colors (#5543)

This commit is contained in:
RickyRister 2025-02-01 19:25:25 -08:00 committed by GitHub
parent 0fc05e15cd
commit 95cea0f191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 1748 additions and 49 deletions

View file

@ -191,8 +191,9 @@ void ChatView::appendMessage(QString message,
const int pixelSize = QFontInfo(cursor.charFormat().font()).pixelSize();
bool isBuddy = userListProxy->isUserBuddy(userName);
const QString privLevel = userInfo.has_privlevel() ? QString::fromStdString(userInfo.privlevel()) : "NONE";
cursor.insertImage(
UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel, isBuddy, privLevel).toImage());
cursor.insertImage(UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel, userInfo.pawn_colors(),
isBuddy, privLevel)
.toImage());
cursor.insertText(" ");
cursor.setCharFormat(senderFormat);
cursor.insertText(userName);