From 2f1650a30d6f3d2f69f09ee1ad3258fc8b0c7e32 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 May 2013 23:36:56 +0300 Subject: dehardcode status bar colors (yellow bar). --- data/graphics/gui/colors.xml | 2 ++ data/themes/blacknblack/colors.xml | 2 ++ data/themes/blackwood/colors.xml | 2 ++ data/themes/enchilado/colors.xml | 2 ++ data/themes/jewelry/colors.xml | 2 ++ data/themes/mana/colors.xml | 2 ++ data/themes/pink/colors.xml | 2 ++ data/themes/unity/colors.xml | 2 ++ data/themes/wood/colors.xml | 2 ++ src/gui/statuswindow.cpp | 16 ++-------------- src/gui/theme.cpp | 4 +++- src/gui/theme.h | 2 ++ 12 files changed, 25 insertions(+), 15 deletions(-) diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml index 95f1e66a3..fb1fe165c 100644 --- a/data/graphics/gui/colors.xml +++ b/data/graphics/gui/colors.xml @@ -93,6 +93,8 @@ + + diff --git a/data/themes/blacknblack/colors.xml b/data/themes/blacknblack/colors.xml index d31f1f519..07623f966 100644 --- a/data/themes/blacknblack/colors.xml +++ b/data/themes/blacknblack/colors.xml @@ -84,6 +84,8 @@ + + diff --git a/data/themes/blackwood/colors.xml b/data/themes/blackwood/colors.xml index b56f7e021..676249d0e 100644 --- a/data/themes/blackwood/colors.xml +++ b/data/themes/blackwood/colors.xml @@ -83,6 +83,8 @@ + + diff --git a/data/themes/enchilado/colors.xml b/data/themes/enchilado/colors.xml index 60b701306..7feb5c9c6 100644 --- a/data/themes/enchilado/colors.xml +++ b/data/themes/enchilado/colors.xml @@ -84,6 +84,8 @@ + + diff --git a/data/themes/jewelry/colors.xml b/data/themes/jewelry/colors.xml index ab6623138..8ecb6fb40 100644 --- a/data/themes/jewelry/colors.xml +++ b/data/themes/jewelry/colors.xml @@ -76,6 +76,8 @@ + + diff --git a/data/themes/mana/colors.xml b/data/themes/mana/colors.xml index 520c874c5..4d924a1f3 100644 --- a/data/themes/mana/colors.xml +++ b/data/themes/mana/colors.xml @@ -84,6 +84,8 @@ + + diff --git a/data/themes/pink/colors.xml b/data/themes/pink/colors.xml index 33c226654..1f2c4df38 100644 --- a/data/themes/pink/colors.xml +++ b/data/themes/pink/colors.xml @@ -84,6 +84,8 @@ + + diff --git a/data/themes/unity/colors.xml b/data/themes/unity/colors.xml index c7398e045..0c708e5d1 100644 --- a/data/themes/unity/colors.xml +++ b/data/themes/unity/colors.xml @@ -83,6 +83,8 @@ + + diff --git a/data/themes/wood/colors.xml b/data/themes/wood/colors.xml index 3517e79e1..0ea653bc5 100644 --- a/data/themes/wood/colors.xml +++ b/data/themes/wood/colors.xml @@ -84,6 +84,8 @@ + + diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index cd7a6e6fd..3bde3eddc 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -731,21 +731,9 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar, bar->setProgress(50); if (player_node->getDisableGameModifiers()) - { - gcn::Color col; - col.r = 100; - col.g = 100; - col.b = 100; - bar->setColor(col); - } + bar->setColor(Theme::getThemeColor(Theme::STATUSBAR_ON)); else - { - gcn::Color col; - col.r = 255; - col.g = 255; - col.b = 0; - bar->setColor(col); - } + bar->setColor(Theme::getThemeColor(Theme::STATUSBAR_OFF)); } void StatusWindow::action(const gcn::ActionEvent &event) diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 76b5e5c7b..c5d358cab 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -910,7 +910,9 @@ static int readColorType(const std::string &type) "GRAY", "GRAY_OUTLINE", "BROWN", - "BROWN_OUTLINE" + "BROWN_OUTLINE", + "STATUSBAR_ON", + "STATUSBAR_OFF" }; if (type.empty()) diff --git a/src/gui/theme.h b/src/gui/theme.h index 87e5dbef2..084868ef2 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -351,6 +351,8 @@ class Theme final : public Palette, public ConfigListener GRAY_OUTLINE, BROWN, BROWN_OUTLINE, + STATUSBAR_ON, + STATUSBAR_OFF, THEME_COLORS_END }; -- cgit v1.2.3-70-g09d2