From 1eda598ab8d34e8d2fd3ecf990fcb64d49f518f8 Mon Sep 17 00:00:00 2001 From: Maximilian Philipps Date: Sun, 2 Aug 2009 20:15:38 +0200 Subject: patch for #813, adds mouse over highlight for radio buttons, tabs, checkboxes, slider and scrollbars --- src/gui/widgets/tab.cpp | 12 +++++------- 1 file changed, 5 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 26bcc636..3e49263e 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -55,7 +55,7 @@ struct TabData static TabData const data[TAB_COUNT] = { { "graphics/gui/tab.png", 0, 0 }, - { "graphics/gui/tab.png", 9, 4 }, + { "graphics/gui/tab_hilight.png", 9, 4 }, { "graphics/gui/tabselected.png", 16, 19 }, { "graphics/gui/tab.png", 25, 23 } }; @@ -123,21 +123,19 @@ void Tab::draw(gcn::Graphics *graphics) // check which type of tab to draw if (mTabbedArea) { + mLabel->setForegroundColor(*mTabColor); if (mTabbedArea->isTabSelected(this)) { mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity - mLabel->setForegroundColor(*mTabColor); mHighlighted = false; - } - else if (mHighlighted) + } else if (mHasMouse) { mode = TAB_HIGHLIGHTED; - mLabel->setForegroundColor(guiPalette->getColor(Palette::TAB_HIGHLIGHT)); } - else + if (mHighlighted) { - mLabel->setForegroundColor(*mTabColor); + mLabel->setForegroundColor(guiPalette->getColor(Palette::TAB_HIGHLIGHT)); } } -- cgit v1.2.3-70-g09d2