From e91282a6213a9809a06cb0cb3deff93e0246fe5b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 8 Sep 2012 02:57:44 +0300 Subject: Allow set tab colors from outside of tab. --- src/gui/widgets/tab.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/gui/widgets/tab.cpp') diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 0999dc7a9..124579fab 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -67,11 +67,11 @@ Tab::Tab() : mTabColor(&Theme::getThemeColor(Theme::TAB)), mTabHighlightedColor(&Theme::getThemeColor(Theme::TAB_HIGHLIGHTED)), mTabSelectedColor(&Theme::getThemeColor(Theme::TAB_SELECTED)), + mFlashColor(&Theme::getThemeColor(Theme::TAB_FLASH)), + mPlayerFlashColor(&Theme::getThemeColor(Theme::TAB_PLAYER_FLASH)), mVertexes(new GraphicsVertexes()), mRedraw(true), - mMode(0), - mFlashColor(Theme::getThemeColor(Theme::TAB_FLASH)), - mPlayerFlashColor(Theme::getThemeColor(Theme::TAB_PLAYER_FLASH)) + mMode(0) { init(); } @@ -161,10 +161,10 @@ void Tab::draw(gcn::Graphics *graphics) switch (mFlash) { case 1: - mLabel->setForegroundColor(mFlashColor); + mLabel->setForegroundColor(*mFlashColor); break; case 2: - mLabel->setForegroundColor(mPlayerFlashColor); + mLabel->setForegroundColor(*mPlayerFlashColor); break; default: break; @@ -192,16 +192,6 @@ void Tab::draw(gcn::Graphics *graphics) drawChildren(graphics); } -void Tab::setTabColor(const gcn::Color *const color) -{ - mTabColor = color; -} - -void Tab::setFlash(const int flash) -{ - mFlash = flash; -} - void Tab::widgetResized(const gcn::Event &event A_UNUSED) { mRedraw = true; -- cgit v1.2.3-70-g09d2