From 1e760aaa1ca5b56b6c5355ab8c8d01ed5be4cfb5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 May 2013 15:26:20 +0300 Subject: Add outline for label default color. --- src/gui/equipmentwindow.cpp | 2 ++ src/gui/equipmentwindow.h | 1 + src/gui/theme.cpp | 1 + src/gui/theme.h | 1 + src/gui/tradewindow.cpp | 6 ++++++ src/gui/widgets/label.cpp | 1 + 6 files changed, 12 insertions(+) (limited to 'src/gui') diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 964181c10..db082e3be 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -69,6 +69,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment, mHighlightColor(getThemeColor(Theme::HIGHLIGHT)), mBorderColor(getThemeColor(Theme::BORDER)), mLabelsColor(getThemeColor(Theme::LABEL)), + mLabelsColor2(getThemeColor(Theme::LABEL_OUTLINE)), mSlotBackground(), mSlotHighlightedBackground(), mVertexes(new ImageCollection), @@ -224,6 +225,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) if (i == EQUIP_PROJECTILE_SLOT) { g->setColor(mLabelsColor); + g->setColor2(mLabelsColor2); const std::string str = toString(item->getQuantity()); font->drawString(g, str, box->x + (mBoxSize - font->getWidth(str)) / 2, diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index 51f6f151b..e14a9916b 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -137,6 +137,7 @@ class EquipmentWindow final : public Window, public gcn::ActionListener gcn::Color mHighlightColor; gcn::Color mBorderColor; gcn::Color mLabelsColor; + gcn::Color mLabelsColor2; Image *mSlotBackground; Image *mSlotHighlightedBackground; ImageCollection *mVertexes; diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 05d0f75ab..556b17932 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -786,6 +786,7 @@ static int readColorType(const std::string &type) "CHECKBOX", "DROPDOWN", "LABEL", + "LABEL_OUTLINE", "LISTBOX", "LISTBOX_SELECTED", "RADIOBUTTON", diff --git a/src/gui/theme.h b/src/gui/theme.h index 809729590..5fc5f4595 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -226,6 +226,7 @@ class Theme final : public Palette, public ConfigListener CHECKBOX, DROPDOWN, LABEL, + LABEL_OUTLINE, LISTBOX, LISTBOX_SELECTED, RADIOBUTTON, diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp index 948e5f964..5410d60dd 100644 --- a/src/gui/tradewindow.cpp +++ b/src/gui/tradewindow.cpp @@ -174,6 +174,8 @@ void TradeWindow::setMoney(const int amount) { mMoneyLabel->setForegroundColor(getThemeColor( static_cast(Theme::LABEL))); + mMoneyLabel->setForegroundColor2(getThemeColor( + static_cast(Theme::LABEL_OUTLINE))); mGotMaxMoney = amount; } @@ -244,6 +246,8 @@ void TradeWindow::reset() mMoneyField->setText(""); mMoneyLabel->setForegroundColor(getThemeColor( static_cast(Theme::LABEL))); + mMoneyLabel->setForegroundColor2(getThemeColor( + static_cast(Theme::LABEL_OUTLINE))); mAddButton->setEnabled(true); mMoneyChangeButton->setEnabled(true); mGotMoney = 0; @@ -416,6 +420,8 @@ void TradeWindow::clear() mGotMaxMoney = 0; mMoneyLabel->setForegroundColor(getThemeColor( static_cast(Theme::LABEL))); + mMoneyLabel->setForegroundColor2(getThemeColor( + static_cast(Theme::LABEL_OUTLINE))); } void TradeWindow::addAutoItem(const std::string &nick, Item* const item, diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp index ad6daa81f..4240ff2ad 100644 --- a/src/gui/widgets/label.cpp +++ b/src/gui/widgets/label.cpp @@ -57,6 +57,7 @@ Label::~Label() void Label::init() { mForegroundColor = getThemeColor(Theme::LABEL); + mForegroundColor2 = getThemeColor(Theme::LABEL_OUTLINE); if (mInstances == 0) { if (Theme::instance()) -- cgit v1.2.3-70-g09d2