summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-06 23:55:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-06 23:55:41 +0300
commit7d3059516fc25134d0d29b497e546f2846162399 (patch)
tree6eb1e2c1f182369727eba4a9c4d28955237694ed
parent20d0c3ab6c19f2a53002699883ba4eb132d3a513 (diff)
downloadplus-7d3059516fc25134d0d29b497e546f2846162399.tar.gz
plus-7d3059516fc25134d0d29b497e546f2846162399.tar.bz2
plus-7d3059516fc25134d0d29b497e546f2846162399.tar.xz
plus-7d3059516fc25134d0d29b497e546f2846162399.zip
Add colors font color for highlighted and selected tab.
New colors: TAB_HIGHLIGHTED, TAB_SELECTED
-rw-r--r--data/graphics/gui/colors.xml2
-rw-r--r--data/themes/blacknblack/colors.xml2
-rw-r--r--data/themes/blackwood/colors.xml2
-rw-r--r--data/themes/enchilado/colors.xml2
-rw-r--r--data/themes/mana/colors.xml2
-rw-r--r--data/themes/pink/colors.xml2
-rw-r--r--data/themes/unity/colors.xml2
-rw-r--r--data/themes/wood/colors.xml2
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/widgets/tab.cpp9
-rw-r--r--src/gui/widgets/tab.h2
12 files changed, 30 insertions, 1 deletions
diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml
index 2ddf9c7fd..b0fa0444e 100644
--- a/data/graphics/gui/colors.xml
+++ b/data/graphics/gui/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#000000" />
<color id="RADIOBUTTON" color="#000000" />
<color id="TAB" color="#000000" />
+ <color id="TAB_HIGHLIGHTED" color="#000000" />
+ <color id="TAB_SELECTED" color="#000000" />
<color id="TEXTBOX" color="#000000" />
<color id="TEXTFIELD" color="#000000" />
<color id="WINDOW" color="#000000" />
diff --git a/data/themes/blacknblack/colors.xml b/data/themes/blacknblack/colors.xml
index 7bc5fd8a5..abdac6e79 100644
--- a/data/themes/blacknblack/colors.xml
+++ b/data/themes/blacknblack/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#ffffff" />
<color id="RADIOBUTTON" color="#ffffff" />
<color id="TAB" color="#13f00d" />
+ <color id="TAB_HIGHLIGHTED" color="#13f00d" />
+ <color id="TAB_SELECTED" color="#13f00d" />
<color id="TEXTBOX" color="#ffffff" />
<color id="TEXTFIELD" color="#ffffff" />
<color id="WINDOW" color="#ffffff" />
diff --git a/data/themes/blackwood/colors.xml b/data/themes/blackwood/colors.xml
index 0f1a16cd8..4d739182f 100644
--- a/data/themes/blackwood/colors.xml
+++ b/data/themes/blackwood/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#000000" />
<color id="RADIOBUTTON" color="#000000" />
<color id="TAB" color="#000000" />
+ <color id="TAB_HIGHLIGHTED" color="#000000" />
+ <color id="TAB_SELECTED" color="#000000" />
<color id="TEXTBOX" color="#000000" />
<color id="TEXTFIELD" color="#000000" />
<color id="WINDOW" color="#000000" />
diff --git a/data/themes/enchilado/colors.xml b/data/themes/enchilado/colors.xml
index 4b44470a0..1ea877c6d 100644
--- a/data/themes/enchilado/colors.xml
+++ b/data/themes/enchilado/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#000000" />
<color id="RADIOBUTTON" color="#000000" />
<color id="TAB" color="#000000" />
+ <color id="TAB_HIGHLIGHTED" color="#000000" />
+ <color id="TAB_SELECTED" color="#000000" />
<color id="TEXTBOX" color="#000000" />
<color id="TEXTFIELD" color="#000000" />
<color id="WINDOW" color="#000000" />
diff --git a/data/themes/mana/colors.xml b/data/themes/mana/colors.xml
index be4522b8a..3081a7493 100644
--- a/data/themes/mana/colors.xml
+++ b/data/themes/mana/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#000000" />
<color id="RADIOBUTTON" color="#000000" />
<color id="TAB" color="#000000" />
+ <color id="TAB_HIGHLIGHTED" color="#000000" />
+ <color id="TAB_SELECTED" color="#000000" />
<color id="TEXTBOX" color="#000000" />
<color id="TEXTFIELD" color="#000000" />
<color id="WINDOW" color="#000000" />
diff --git a/data/themes/pink/colors.xml b/data/themes/pink/colors.xml
index 2aaae8a58..0b69b1149 100644
--- a/data/themes/pink/colors.xml
+++ b/data/themes/pink/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#FF00FF" />
<color id="RADIOBUTTON" color="#FF00FF" />
<color id="TAB" color="#FF32FF" />
+ <color id="TAB_HIGHLIGHTED" color="#FF32FF" />
+ <color id="TAB_SELECTED" color="#FF32FF" />
<color id="TEXTBOX" color="#FF00FF" />
<color id="TEXTFIELD" color="#FF00FF" />
<color id="WINDOW" color="#FF00FF" />
diff --git a/data/themes/unity/colors.xml b/data/themes/unity/colors.xml
index f0f11f928..564c024de 100644
--- a/data/themes/unity/colors.xml
+++ b/data/themes/unity/colors.xml
@@ -12,6 +12,8 @@
<color id="LISTBOX" color="#E0E0E0" />
<color id="RADIOBUTTON" color="#E0E0E0" />
<color id="TAB" color="#E0E0E0" />
+ <color id="TAB_HIGHLIGHTED" color="#E0E0E0" />
+ <color id="TAB_SELECTED" color="#E0E0E0" />
<color id="TEXTBOX" color="#E0E0E0" />
<color id="TEXTFIELD" color="#E0E0E0" />
<color id="WINDOW" color="#E0E0E0" />
diff --git a/data/themes/wood/colors.xml b/data/themes/wood/colors.xml
index 4d7f0a083..ef4e698f4 100644
--- a/data/themes/wood/colors.xml
+++ b/data/themes/wood/colors.xml
@@ -13,6 +13,8 @@
<color id="LISTBOX" color="#000000" />
<color id="RADIOBUTTON" color="#000000" />
<color id="TAB" color="#000000" />
+ <color id="TAB_HIGHLIGHTED" color="#000000" />
+ <color id="TAB_SELECTED" color="#000000" />
<color id="TEXTBOX" color="#000000" />
<color id="TEXTFIELD" color="#000000" />
<color id="WINDOW" color="#000000" />
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 2d21f1a2b..fd6ccc23d 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -685,6 +685,8 @@ static int readColorType(const std::string &type)
"LISTBOX",
"RADIOBUTTON",
"TAB",
+ "TAB_HIGHLIGHTED",
+ "TAB_SELECTED",
"TEXTBOX",
"TEXTFIELD",
"WINDOW",
diff --git a/src/gui/theme.h b/src/gui/theme.h
index de027523d..f73988c48 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -177,6 +177,8 @@ class Theme : public Palette, public ConfigListener
LISTBOX,
RADIOBUTTON,
TAB,
+ TAB_HIGHLIGHTED,
+ TAB_SELECTED,
TEXTBOX,
TEXTFIELD,
WINDOW,
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)
{
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index 0907379d0..d0fa41eb6 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -87,6 +87,8 @@ class Tab : public gcn::Tab, public gcn::WidgetListener
static float mAlpha;
const gcn::Color *mTabColor;
+ const gcn::Color *mTabHighlightedColor;
+ const gcn::Color *mTabSelectedColor;
int mFlash;
GraphicsVertexes *mVertexes;
bool mRedraw;