summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/botcheckerwindow.cpp1
-rw-r--r--src/gui/equipmentwindow.cpp2
-rw-r--r--src/gui/outfitwindow.cpp5
-rw-r--r--src/gui/statuswindow.cpp2
-rw-r--r--src/gui/theme.cpp3
-rw-r--r--src/gui/theme.h3
-rw-r--r--src/gui/widgets/desktop.cpp7
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp8
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp1
10 files changed, 20 insertions, 14 deletions
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();