diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:13:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-28 00:45:34 +0300 |
commit | d05f3904b05e8af1cd319d75a380b2cce7edf77d (patch) | |
tree | cd29c1f738ac6415cbee8940034a4143f4c72886 /src/gui/widgets/tab.cpp | |
parent | dba24b2e59eb739e73228dbcf707e943905a9e5a (diff) | |
download | manaverse-d05f3904b05e8af1cd319d75a380b2cce7edf77d.tar.gz manaverse-d05f3904b05e8af1cd319d75a380b2cce7edf77d.tar.bz2 manaverse-d05f3904b05e8af1cd319d75a380b2cce7edf77d.tar.xz manaverse-d05f3904b05e8af1cd319d75a380b2cce7edf77d.zip |
Add outlining support to tabs.
Diffstat (limited to 'src/gui/widgets/tab.cpp')
-rw-r--r-- | src/gui/widgets/tab.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index a0ebc7732..b5e301b24 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -64,10 +64,16 @@ Tab::Tab(const Widget2 *const widget) : mHasMouse(false), mTabbedArea(nullptr), mTabColor(&getThemeColor(Theme::TAB)), + mTabOutlineColor(&getThemeColor(Theme::TAB_OUTLINE)), mTabHighlightedColor(&getThemeColor(Theme::TAB_HIGHLIGHTED)), + mTabHighlightedOutlineColor(&getThemeColor( + Theme::TAB_HIGHLIGHTED_OUTLINE)), mTabSelectedColor(&getThemeColor(Theme::TAB_SELECTED)), + mTabSelectedOutlineColor(&getThemeColor(Theme::TAB_SELECTED_OUTLINE)), mFlashColor(&getThemeColor(Theme::TAB_FLASH)), + mFlashOutlineColor(&getThemeColor(Theme::TAB_FLASH_OUTLINE)), mPlayerFlashColor(&getThemeColor(Theme::TAB_PLAYER_FLASH)), + mPlayerFlashOutlineColor(&getThemeColor(Theme::TAB_PLAYER_FLASH_OUTLINE)), mVertexes(new ImageCollection), mRedraw(true), mMode(0) @@ -155,28 +161,32 @@ void Tab::draw(gcn::Graphics *graphics) { if (mTabbedArea->isTabSelected(this)) { - mLabel->setForegroundColor(*mTabSelectedColor); + mLabel->setForegroundColorAll(*mTabSelectedColor, + *mTabSelectedOutlineColor); mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity mFlash = 0; } else if (mHasMouse) { - mLabel->setForegroundColor(*mTabHighlightedColor); + mLabel->setForegroundColorAll(*mTabHighlightedColor, + *mTabHighlightedOutlineColor); mode = TAB_HIGHLIGHTED; } else { - mLabel->setForegroundColor(*mTabColor); + mLabel->setForegroundColorAll(*mTabColor, *mTabOutlineColor); } switch (mFlash) { case 1: - mLabel->setForegroundColor(*mFlashColor); + mLabel->setForegroundColorAll(*mFlashColor, + *mFlashOutlineColor); break; case 2: - mLabel->setForegroundColor(*mPlayerFlashColor); + mLabel->setForegroundColorAll(*mPlayerFlashColor, + *mPlayerFlashOutlineColor); break; default: break; |