summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-31 18:46:22 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-31 18:46:22 +0300
commit34cb5e4b16c1b1f5d3263dd01848b24ab0b9b354 (patch)
treed8219b2bb206f5d97f4f76599577fdb15d4ac2cc /src/gui/windows
parent6683d42b636619e02e2bcf98923a2fdbf44bd95b (diff)
downloadmanaplus-34cb5e4b16c1b1f5d3263dd01848b24ab0b9b354.tar.gz
manaplus-34cb5e4b16c1b1f5d3263dd01848b24ab0b9b354.tar.bz2
manaplus-34cb5e4b16c1b1f5d3263dd01848b24ab0b9b354.tar.xz
manaplus-34cb5e4b16c1b1f5d3263dd01848b24ab0b9b354.zip
Convert ThemeColorId enum into strong typed enum.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/ministatuswindow.cpp2
-rw-r--r--src/gui/windows/ministatuswindow.h2
-rw-r--r--src/gui/windows/tradewindow.cpp24
3 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 7d0e030b3..73663c3a7 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -175,7 +175,7 @@ MiniStatusWindow::~MiniStatusWindow()
ProgressBar *MiniStatusWindow::createBar(const float progress,
const int width,
const int height,
- const int textColor,
+ const ThemeColorId textColor,
const ProgressColorIdT backColor,
const std::string &restrict skin,
const std::string &restrict skinFill,
diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h
index 2edb8e66e..dbe2b76e8 100644
--- a/src/gui/windows/ministatuswindow.h
+++ b/src/gui/windows/ministatuswindow.h
@@ -112,7 +112,7 @@ class MiniStatusWindow final : public Window,
ProgressBar *createBar(const float progress,
const int width,
const int height,
- const int textColor,
+ const ThemeColorId textColor,
const ProgressColorIdT backColor,
const std::string &restrict skin,
const std::string &restrict skinFill,
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 11d150f30..c5951a7a5 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -173,16 +173,16 @@ void TradeWindow::setMoney(const int amount)
}
else
{
- mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(ThemeColorId::WARNING)), getThemeColor(
- static_cast<int>(ThemeColorId::WARNING_OUTLINE)));
+ mMoneyLabel->setForegroundColorAll(
+ getThemeColor(ThemeColorId::WARNING),
+ getThemeColor(ThemeColorId::WARNING_OUTLINE));
}
}
else
{
- mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
- static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
+ mMoneyLabel->setForegroundColorAll(
+ getThemeColor(ThemeColorId::LABEL),
+ getThemeColor(ThemeColorId::LABEL_OUTLINE));
mGotMaxMoney = amount;
}
@@ -277,9 +277,9 @@ void TradeWindow::reset()
setMoney(0);
mMoneyField->setEnabled(true);
mMoneyField->setText("");
- mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
- static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
+ mMoneyLabel->setForegroundColorAll(
+ getThemeColor(ThemeColorId::LABEL),
+ getThemeColor(ThemeColorId::LABEL_OUTLINE));
mAddButton->setEnabled(true);
mMoneyChangeButton->setEnabled(true);
mGotMoney = 0;
@@ -448,9 +448,9 @@ void TradeWindow::clear()
mAutoAddAmount = 0;
mGotMoney = 0;
mGotMaxMoney = 0;
- mMoneyLabel->setForegroundColorAll(getThemeColor(
- static_cast<int>(ThemeColorId::LABEL)), getThemeColor(
- static_cast<int>(ThemeColorId::LABEL_OUTLINE)));
+ mMoneyLabel->setForegroundColorAll(
+ getThemeColor(ThemeColorId::LABEL),
+ getThemeColor(ThemeColorId::LABEL_OUTLINE));
}
void TradeWindow::addAutoItem(const std::string &nick, Item* const item,