diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-06 23:55:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-06 23:55:41 +0300 |
commit | 7d3059516fc25134d0d29b497e546f2846162399 (patch) | |
tree | 6eb1e2c1f182369727eba4a9c4d28955237694ed /src/gui/widgets/tab.cpp | |
parent | 20d0c3ab6c19f2a53002699883ba4eb132d3a513 (diff) | |
download | ManaVerse-7d3059516fc25134d0d29b497e546f2846162399.tar.gz ManaVerse-7d3059516fc25134d0d29b497e546f2846162399.tar.bz2 ManaVerse-7d3059516fc25134d0d29b497e546f2846162399.tar.xz ManaVerse-7d3059516fc25134d0d29b497e546f2846162399.zip |
Add colors font color for highlighted and selected tab.
New colors: TAB_HIGHLIGHTED, TAB_SELECTED
Diffstat (limited to 'src/gui/widgets/tab.cpp')
-rw-r--r-- | src/gui/widgets/tab.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index eb470cc02..479735e7c 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -64,6 +64,8 @@ ImageRect Tab::tabImg[TAB_COUNT]; Tab::Tab() : gcn::Tab(), mTabColor(&Theme::getThemeColor(Theme::TAB)), + mTabHighlightedColor(&Theme::getThemeColor(Theme::TAB_HIGHLIGHTED)), + mTabSelectedColor(&Theme::getThemeColor(Theme::TAB_SELECTED)), mVertexes(new GraphicsVertexes()), mRedraw(true), mMode(0), @@ -138,17 +140,22 @@ void Tab::draw(gcn::Graphics *graphics) // check which type of tab to draw if (mTabbedArea) { - mLabel->setForegroundColor(*mTabColor); if (mTabbedArea->isTabSelected(this)) { + mLabel->setForegroundColor(*mTabSelectedColor); mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity mFlash = 0; } else if (mHasMouse) { + mLabel->setForegroundColor(*mTabHighlightedColor); mode = TAB_HIGHLIGHTED; } + else + { + mLabel->setForegroundColor(*mTabColor); + } switch (mFlash) { |