From d05f3904b05e8af1cd319d75a380b2cce7edf77d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Dec 2012 23:13:19 +0300 Subject: Add outlining support to tabs. --- src/gui/widgets/tab.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/gui/widgets/tab.cpp') 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; -- cgit v1.2.3-70-g09d2