summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tab.cpp
diff options
context:
space:
mode:
authorMaximilian Philipps <Turmfalke2007@web.de>2009-08-02 20:15:38 +0200
committerChuck Miller <shadowmil@gmail.com>2009-08-05 15:19:32 -0400
commit1eda598ab8d34e8d2fd3ecf990fcb64d49f518f8 (patch)
tree098001f83da97cc77cb234dc40bc23dae6d8fe95 /src/gui/widgets/tab.cpp
parent5c578f9d64bfcc0dbd81d9c6bad549a65bd1ad32 (diff)
downloadmana-client-1eda598ab8d34e8d2fd3ecf990fcb64d49f518f8.tar.gz
mana-client-1eda598ab8d34e8d2fd3ecf990fcb64d49f518f8.tar.bz2
mana-client-1eda598ab8d34e8d2fd3ecf990fcb64d49f518f8.tar.xz
mana-client-1eda598ab8d34e8d2fd3ecf990fcb64d49f518f8.zip
patch for #813, adds mouse over highlight for
radio buttons, tabs, checkboxes, slider and scrollbars
Diffstat (limited to 'src/gui/widgets/tab.cpp')
-rw-r--r--src/gui/widgets/tab.cpp12
1 files changed, 5 insertions, 7 deletions
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));
}
}