summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-09 14:35:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-09 14:38:49 +0300
commite6848c0aa8b1447c5e19bd1923f3fbd2866e635b (patch)
tree9395c616e9d77b12b156b85518164a8630484d48 /src/gui
parentea84eba2562bfb87ecbc469000082d022b209505 (diff)
downloadplus-e6848c0aa8b1447c5e19bd1923f3fbd2866e635b.tar.gz
plus-e6848c0aa8b1447c5e19bd1923f3fbd2866e635b.tar.bz2
plus-e6848c0aa8b1447c5e19bd1923f3fbd2866e635b.tar.xz
plus-e6848c0aa8b1447c5e19bd1923f3fbd2866e635b.zip
Add text colors for weight bar.
New theme colors: WEIGHT_BAR, WEIGHT_BAR_OUTLINE
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/windows/inventorywindow.cpp2
-rw-r--r--src/gui/windows/ministatuswindow.cpp2
4 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index aa0b87bcb..c69335a07 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -961,6 +961,8 @@ static int readColorType(const std::string &type)
"NO_MP_BAR_OUTLINE"
"XP_BAR",
"XP_BAR_OUTLINE"
+ "WEIGHT_BAR",
+ "WEIGHT_BAR_OUTLINE"
};
if (type.empty())
diff --git a/src/gui/theme.h b/src/gui/theme.h
index bbcce646f..155ff6b6a 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -404,6 +404,8 @@ class Theme final : public Palette, public ConfigListener
NO_MP_BAR_OUTLINE,
XP_BAR,
XP_BAR_OUTLINE,
+ WEIGHT_BAR,
+ WEIGHT_BAR_OUTLINE,
THEME_COLORS_END
};
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index b9c89ad96..bdc0b342e 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -226,6 +226,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
// TRANSLATORS: inventory button
mEquipmentButton = new Button(this, _("Equipment"), "equipment", this);
mWeightBar = new ProgressBar(this, 0.0F, 100, 0, Theme::PROG_WEIGHT);
+ mWeightBar->setColor(Theme::getThemeColor(Theme::WEIGHT_BAR),
+ Theme::getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
place(0, 0, mWeightBar, 4);
mSlotsBarCell = &place(4, 0, mSlotsBar, 5);
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index be691b72e..4cc913eb9 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -75,7 +75,7 @@ MiniStatusWindow::MiniStatusWindow() :
// TRANSLATORS: status bar name
"xp bar", _("experience bar"))),
mJobBar(nullptr),
- mWeightBar(createBar(0, 140, 0, Theme::PROGRESS_BAR, Theme::PROG_WEIGHT,
+ mWeightBar(createBar(0, 140, 0, Theme::WEIGHT_BAR, Theme::PROG_WEIGHT,
// TRANSLATORS: status bar name
"weight bar", _("weight bar"))),
mInvSlotsBar(createBar(0, 45, 0,