From e2346b46f97d651e27759e374634f821cccc5a5e Mon Sep 17 00:00:00 2001 From: doitux Date: Wed, 14 Jul 2010 10:08:12 +0000 Subject: [PATCH] chat color bugfix. change inet game name dialog bugfix --- src/gui/qt/changecontentdialog.ui | 2 +- src/gui/qt/chattools/chattools.cpp | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/gui/qt/changecontentdialog.ui b/src/gui/qt/changecontentdialog.ui index 93788192..a9419ef5 100644 --- a/src/gui/qt/changecontentdialog.ui +++ b/src/gui/qt/changecontentdialog.ui @@ -46,7 +46,7 @@ in der Konfiguration speichern! - false + true diff --git a/src/gui/qt/chattools/chattools.cpp b/src/gui/qt/chattools/chattools.cpp index bedbaf63..32b0692d 100644 --- a/src/gui/qt/chattools/chattools.cpp +++ b/src/gui/qt/chattools/chattools.cpp @@ -69,7 +69,7 @@ void ChatTools::receiveMessage(QString playerName, QString message) { switch (myChatType) { case INET_LOBBY_CHAT: { - tempMsg = QString("palette().highlight().color().name()+";\">"+message+""); + tempMsg = QString("palette().linkVisited().color().name()+";\">"+message+""); //play beep sound only in INET-lobby-chat // TODO dont play when message is from yourself if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) { @@ -84,9 +84,20 @@ void ChatTools::receiveMessage(QString playerName, QString message) { default: tempMsg = message; } } + else if(playerName == myNick) { + switch (myChatType) { + case INET_LOBBY_CHAT: tempMsg = QString("palette().linkVisited().color().name()+";\">"+message+""); + break; + case LAN_LOBBY_CHAT: tempMsg = QString(""+message+""); + break; + case INGAME_CHAT: tempMsg = QString("getChatLogTextColor()+";\">"+message+""); + break; + default: tempMsg = message; + } + } else { switch (myChatType) { - case INET_LOBBY_CHAT: tempMsg = QString("palette().highlight().color().name()+";\">"+message+""); + case INET_LOBBY_CHAT: tempMsg = QString("palette().text().color().name()+";\">"+message+""); break; case LAN_LOBBY_CHAT: tempMsg = QString(""+message+""); break;