From 3575c7a606c2d24c0d444e9999892c0390fa5ae8 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 14 Mar 2009 13:21:35 -0600 Subject: Made a label class derived from the guichan label class which utilizes the palette colors. While technically, this can be accomplished through other means, it's rather clumsy overall, and is prone to introducing in programmer errors. This commit finally catches every case where text is used, and applies the text color from the color dialog to each of them appropriately. Signed-off-by: Ira Rice --- src/gui/widgets/tab.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/tab.cpp') diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 97f6010c..942ad3ef 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -25,6 +25,8 @@ #include "tab.h" #include "tabbedarea.h" +#include "../palette.h" + #include "../../configuration.h" #include "../../graphics.h" @@ -124,13 +126,17 @@ void Tab::draw(gcn::Graphics *graphics) { mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity - mLabel->setForegroundColor(gcn::Color(0, 0, 0)); + mLabel->setForegroundColor(guiPalette->getColor(Palette::TEXT)); mHighlighted = false; } else if (mHighlighted) { mode = TAB_HIGHLIGHTED; - mLabel->setForegroundColor(gcn::Color(255, 0, 0)); + mLabel->setForegroundColor(guiPalette->getColor(Palette::TAB_HIGHLIGHT)); + } + else + { + mLabel->setForegroundColor(guiPalette->getColor(Palette::TEXT)); } } -- cgit v1.2.3-60-g2f50