diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-22 16:28:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-22 16:28:01 +0300 |
commit | 7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (patch) | |
tree | 1909b542e825fee82549cc3c8e3c7b7227b8956b | |
parent | 8257d7d35e0dd915512df06cafb810f4611be06a (diff) | |
download | manaplus-7bedfccf5982534a9cbcb2c18ca0d37df117bfc8.tar.gz manaplus-7bedfccf5982534a9cbcb2c18ca0d37df117bfc8.tar.bz2 manaplus-7bedfccf5982534a9cbcb2c18ca0d37df117bfc8.tar.xz manaplus-7bedfccf5982534a9cbcb2c18ca0d37df117bfc8.zip |
Add new colors to themes: BORDER, BACKGROUND_GRAY, SCROLLBAR_GRAY.
-rw-r--r-- | data/graphics/gui/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/blackwood/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/enchilado/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/mana/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/pink/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/redandblack/colors.xml | 3 | ||||
-rw-r--r-- | data/themes/wood/colors.xml | 3 | ||||
-rw-r--r-- | src/gui/botcheckerwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/outfitwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/statuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/theme.cpp | 3 | ||||
-rw-r--r-- | src/gui/theme.h | 3 | ||||
-rw-r--r-- | src/gui/widgets/desktop.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/spellshortcutcontainer.cpp | 1 |
17 files changed, 41 insertions, 14 deletions
diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml index b17e4b80c..017b55400 100644 --- a/data/graphics/gui/colors.xml +++ b/data/graphics/gui/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#000000" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#000000" /> <color id="BUTTON_DISABLED" color="#333333" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#f48055" /> <color id="GUILD_SOCIAL_TAB" color="#f48055" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#ebc873" /> <color id="TAB_FLASH" color="#ff0000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/data/themes/blackwood/colors.xml b/data/themes/blackwood/colors.xml index b30121a6b..b85ccdfc7 100644 --- a/data/themes/blackwood/colors.xml +++ b/data/themes/blackwood/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#7a7972" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#000000" /> <color id="BUTTON_DISABLED" color="#333333" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#ff00d8" /> <color id="GUILD_SOCIAL_TAB" color="#ff00d8" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#361c00" /> <color id="TAB_FLASH" color="#000000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/data/themes/enchilado/colors.xml b/data/themes/enchilado/colors.xml index 839f06772..38167192d 100644 --- a/data/themes/enchilado/colors.xml +++ b/data/themes/enchilado/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#000000" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#000000" /> <color id="BUTTON_DISABLED" color="#333333" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#f48055" /> <color id="GUILD_SOCIAL_TAB" color="#f48055" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#ebc873" /> <color id="TAB_FLASH" color="#ff0000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/data/themes/mana/colors.xml b/data/themes/mana/colors.xml index 9e7b73c69..96a929a5e 100644 --- a/data/themes/mana/colors.xml +++ b/data/themes/mana/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#000000" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#000000" /> <color id="BUTTON_DISABLED" color="#333333" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#ff00d8" /> <color id="GUILD_SOCIAL_TAB" color="#ff00d8" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#c0c0c0" /> <color id="TAB_FLASH" color="#ff0000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/data/themes/pink/colors.xml b/data/themes/pink/colors.xml index 2e56c6e3c..44aac3527 100644 --- a/data/themes/pink/colors.xml +++ b/data/themes/pink/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#FF00FF" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#FF00FF" /> <color id="BUTTON_DISABLED" color="#FF00FF" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#f48055" /> <color id="GUILD_SOCIAL_TAB" color="#f48055" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#FFFEFF" /> <color id="TAB_FLASH" color="#ff0000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/data/themes/redandblack/colors.xml b/data/themes/redandblack/colors.xml index fc026b361..b705241fb 100644 --- a/data/themes/redandblack/colors.xml +++ b/data/themes/redandblack/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#000000" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#000000" /> <color id="BUTTON_DISABLED" color="#333333" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#ff00d8" /> <color id="GUILD_SOCIAL_TAB" color="#ff00d8" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#c0c0c0" /> <color id="TAB_FLASH" color="#ff0000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/data/themes/wood/colors.xml b/data/themes/wood/colors.xml index 67c2da3c7..1080f2022 100644 --- a/data/themes/wood/colors.xml +++ b/data/themes/wood/colors.xml @@ -2,6 +2,7 @@ <color id="TEXT" color="#000000" /> <color id="SHADOW" color="#000000" /> <color id="OUTLINE" color="#000000" /> + <color id="BORDER" color="#000000" /> <color id="PROGRESS_BAR" color="#ffffff" /> <color id="BUTTON" color="#000000" /> <color id="BUTTON_DISABLED" color="#cccccc" /> @@ -11,6 +12,8 @@ <color id="GUILD_CHAT_TAB" color="#f48055" /> <color id="GUILD_SOCIAL_TAB" color="#f48055" /> <color id="BACKGROUND" color="#ffffff" /> + <color id="BACKGROUND_GRAY" color="#404040" /> + <color id="SCROLLBAR_GRAY" color="#000000" /> <color id="HIGHLIGHT" color="#ebc873" /> <color id="TAB_FLASH" color="#ff0000" effect="pulse" /> <color id="TAB_PLAYER_FLASH" color="#00ff00" effect="pulse" /> diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp index 2851d3d1d..4a8f8cf0d 100644 --- a/src/gui/botcheckerwindow.cpp +++ b/src/gui/botcheckerwindow.cpp @@ -290,7 +290,6 @@ BotCheckerWindow::BotCheckerWindow(): } mPlayerTitleTable = new GuiTable(mPlayerTableTitleModel); - //mPlayerTitleTable->setBackgroundColor(gcn::Color(0xbf, 0xbf, 0xbf)); mPlayerTitleTable->setHeight(1); mPlayerTableTitleModel->set(0, 0, new Label(_("Name"))); diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index ddcd6b81c..3284301ec 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -147,7 +147,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) } // Set color black - g->setColor(Theme::getThemeColor(Theme::OUTLINE)); + g->setColor(Theme::getThemeColor(Theme::BORDER)); // Draw box border g->drawRectangle(gcn::Rectangle(box->first, box->second, BOX_WIDTH, BOX_HEIGHT)); diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index 09e75856f..79ac88d94 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -32,6 +32,7 @@ #include "playerinfo.h" #include "gui/chatwindow.h" +#include "gui/theme.h" #include "gui/viewport.h" #include "gui/widgets/button.h" @@ -303,9 +304,9 @@ void OutfitWindow::draw(gcn::Graphics *graphics) const int itemX = 10 + ((i % mGridWidth) * mBoxWidth); const int itemY = 25 + ((i / mGridWidth) * mBoxHeight); - graphics->setColor(gcn::Color(0, 0, 0, 64)); + graphics->setColor(Theme::getThemeColor(Theme::BORDER, 64)); graphics->drawRectangle(gcn::Rectangle(itemX, itemY, 32, 32)); - graphics->setColor(gcn::Color(255, 255, 255, 32)); + graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND, 32)); graphics->fillRectangle(gcn::Rectangle(itemX, itemY, 32, 32)); if (mItems[mCurrentOutfit][i] < 0) diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index a60707f4c..7ab2afa2d 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -889,7 +889,6 @@ void StatusWindow::updateStatusBar(ProgressBar *bar, bool percent A_UNUSED) col.r = 100; col.g = 100; col.b = 100; -// bar->setColor(new gcn::Color(100, 100, 100)); bar->setColor(col); } else @@ -898,7 +897,6 @@ void StatusWindow::updateStatusBar(ProgressBar *bar, bool percent A_UNUSED) col.r = 255; col.g = 255; col.b = 0; -// bar->setColor(new gcn::Color(255, 255, 0)); bar->setColor(col); } } diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index e126c0505..5fcfeade2 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -599,6 +599,7 @@ static int readColorType(const std::string &type) "TEXT", "SHADOW", "OUTLINE", + "BORDER", "PROGRESS_BAR", "BUTTON", "BUTTON_DISABLED", @@ -608,6 +609,8 @@ static int readColorType(const std::string &type) "GUILD_CHAT_TAB", "GUILD_SOCIAL_TAB", "BACKGROUND", + "BACKGROUND_GRAY", + "SCROLLBAR_GRAY", "HIGHLIGHT", "TAB_FLASH", "TAB_PLAYER_FLASH", diff --git a/src/gui/theme.h b/src/gui/theme.h index 5fe938a20..bdcdafc74 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -143,6 +143,7 @@ class Theme : public Palette, public ConfigListener TEXT = 0, SHADOW, OUTLINE, + BORDER, PROGRESS_BAR, BUTTON, BUTTON_DISABLED, @@ -152,6 +153,8 @@ class Theme : public Palette, public ConfigListener GUILD_CHAT_TAB, GUILD_SOCIAL_TAB, BACKGROUND, + BACKGROUND_GRAY, + SCROLLBAR_GRAY, HIGHLIGHT, TAB_FLASH, TAB_PLAYER_FLASH, diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index cfb757638..40d90ba11 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -53,7 +53,8 @@ Desktop::Desktop() : mVersionLabel = new Label(strprintf("%s (Mana %s)", appName.c_str(), FULL_VERSION)); - mVersionLabel->setBackgroundColor(gcn::Color(255, 255, 255, 128)); + mVersionLabel->setBackgroundColor( + Theme::getThemeColor(Theme::BACKGROUND, 128)); add(mVersionLabel, 25, 2); } @@ -85,7 +86,7 @@ void Desktop::draw(gcn::Graphics *graphics) getHeight() > mWallpaper->getHeight())) { // TODO: Color from palette - g->setColor(gcn::Color(64, 64, 64)); + g->setColor(Theme::getThemeColor(Theme::BACKGROUND_GRAY)); g->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -106,7 +107,7 @@ void Desktop::draw(gcn::Graphics *graphics) } // Draw a thin border under the application version... - g->setColor(gcn::Color(255, 255, 255, 128)); + g->setColor(Theme::getThemeColor(Theme::BACKGROUND, 128)); g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); Container::draw(graphics); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index c2a5ec1b7..c28e4fb4c 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -213,6 +213,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) } } +/* // Draw an orange box around the selected item if (isFocused() && mHighlightedIndex != -1 && mGridColumns) { @@ -221,6 +222,7 @@ void ItemContainer::draw(gcn::Graphics *graphics) g->setColor(gcn::Color(255, 128, 0)); g->drawRectangle(gcn::Rectangle(itemX, itemY, BOX_WIDTH, BOX_HEIGHT)); } +*/ } void ItemContainer::selectNone() diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 03f5f8c4c..3e90bf4c7 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -439,17 +439,17 @@ void ScrollArea::drawRightButton(gcn::Graphics *graphics) void ScrollArea::drawVBar(gcn::Graphics *graphics) { const gcn::Rectangle dim = getVerticalBarDimension(); - graphics->setColor(gcn::Color(0, 0, 0, 32)); + graphics->setColor(Theme::getThemeColor(Theme::SCROLLBAR_GRAY, 32)); graphics->fillRectangle(dim); - graphics->setColor(gcn::Color(255, 255, 255)); + graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND)); } void ScrollArea::drawHBar(gcn::Graphics *graphics) { const gcn::Rectangle dim = getHorizontalBarDimension(); - graphics->setColor(gcn::Color(0, 0, 0, 32)); + graphics->setColor(Theme::getThemeColor(Theme::SCROLLBAR_GRAY, 32)); graphics->fillRectangle(dim); - graphics->setColor(gcn::Color(255, 255, 255)); + graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND)); } void ScrollArea::drawVMarker(gcn::Graphics *graphics) diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 8d5b563bb..7e19b0348 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -106,7 +106,6 @@ void SpellShortcutContainer::draw(gcn::Graphics *graphics) Graphics *g = static_cast<Graphics*>(graphics); - graphics->setColor(gcn::Color(0, 0, 0, 255)); graphics->setFont(getFont()); int selectedId = spellShortcut->getSelectedItem(); |