summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chatwindow.cpp3
-rw-r--r--src/gui/widgets/tab.cpp8
-rw-r--r--src/gui/widgets/tab.h6
3 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 1712a3f16..a575b7054 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -34,6 +34,7 @@
#include "spellshortcut.h"
#include "sound.h"
+#include "gui/gui.h"
#include "gui/setup.h"
#include "gui/sdlinput.h"
#include "gui/theme.h"
@@ -1004,6 +1005,8 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo)
else
{
ret = new WhisperTab(nick);
+ if (gui && !player_relations.isGoodName(nick))
+ ret->setLabelFont(gui->getSecureFont());
mWhispers[tempNick] = ret;
if (config.getBoolValue("showChatHistory"))
ret->loadFromLogFile(nick);
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 7287d6a8e..37a32480d 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -229,3 +229,11 @@ void Tab::widgetMoved(const gcn::Event &event _UNUSED_)
{
mRedraw = true;
}
+
+void Tab::setLabelFont(gcn::Font *font)
+{
+ if (!mLabel)
+ return;
+
+ mLabel->setFont(font);
+}
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index f9f1fa4da..5847bd505 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -23,6 +23,7 @@
#ifndef TAB_H
#define TAB_H
+#include <guichan/widgets/label.hpp>
#include <guichan/widgets/tab.hpp>
#include <guichan/widgetlistener.hpp>
@@ -67,6 +68,11 @@ class Tab : public gcn::Tab, public gcn::WidgetListener
void widgetMoved(const gcn::Event &event);
+ void setLabelFont(gcn::Font *font);
+
+ gcn::Label *getLabel()
+ { return mLabel; }
+
protected:
friend class TabbedArea;
virtual void setCurrent()