From 781b3c9f17708cc5fe08eb3c9ee38d596364d97c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 4 Mar 2010 22:41:19 -0700 Subject: Split Palette into Theme and UserPalette MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer --- src/gui/widgets/tab.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/tab.cpp') diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index d770dbfe..2ab126dd 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -63,7 +63,7 @@ static TabData const data[TAB_COUNT] = { ImageRect Tab::tabImg[TAB_COUNT]; Tab::Tab() : gcn::Tab(), - mTabColor(&guiPalette->getColor(Palette::TAB)) + mTabColor(&Theme::getThemeColor(Theme::TAB)) { init(); } @@ -85,7 +85,7 @@ void Tab::init() { setFocusable(false); setFrameSize(0); - mHighlighted = false; + mFlash = false; if (mInstances == 0) { @@ -148,15 +148,15 @@ void Tab::draw(gcn::Graphics *graphics) { mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity - mHighlighted = false; + mFlash = false; } else if (mHasMouse) { mode = TAB_HIGHLIGHTED; } - if (mHighlighted) + if (mFlash) { - mLabel->setForegroundColor(guiPalette->getColor(Palette::TAB_HIGHLIGHT)); + mLabel->setForegroundColor(Theme::getThemeColor(Theme::TAB_FLASH)); } } @@ -175,7 +175,7 @@ void Tab::setTabColor(const gcn::Color *color) mTabColor = color; } -void Tab::setHighlighted(bool high) +void Tab::setFlash(bool flash) { - mHighlighted = high; + mFlash = flash; } -- cgit v1.2.3-70-g09d2