summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-08-02 03:29:09 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-02 03:29:54 +0200
commit7e8ba785e95385d32024e151697d2e6d4ec61ef3 (patch)
tree6cd8722f2ee42372eea4d8537bf60add24063c9d
parentf6bb0f06c1c6de9c2a893459e2e04e7b6ae58348 (diff)
downloadmana-7e8ba785e95385d32024e151697d2e6d4ec61ef3.tar.gz
mana-7e8ba785e95385d32024e151697d2e6d4ec61ef3.tar.bz2
mana-7e8ba785e95385d32024e151697d2e6d4ec61ef3.tar.xz
mana-7e8ba785e95385d32024e151697d2e6d4ec61ef3.zip
Made download progress colorable
-rw-r--r--data/graphics/gui/colors.xml1
-rw-r--r--src/gui/updaterwindow.cpp3
-rw-r--r--src/resources/theme.cpp3
-rw-r--r--src/resources/theme.h1
4 files changed, 6 insertions, 2 deletions
diff --git a/data/graphics/gui/colors.xml b/data/graphics/gui/colors.xml
index 1dfa820c..52b755f2 100644
--- a/data/graphics/gui/colors.xml
+++ b/data/graphics/gui/colors.xml
@@ -48,4 +48,5 @@
<progressbar id="INVY_SLOTS" color="#e1c819" />
<progressbar id="WEIGHT" color="#0000ff,ffff00,ff0000" />
<progressbar id="JOB" color="#e187cb" />
+ <progressbar id="DOWNLOAD" color="#ff0000" />
</colors>
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index fe036814..40da4487 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -37,6 +37,7 @@
#include "net/download.h"
#include "resources/resourcemanager.h"
+#include "resources/theme.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -147,7 +148,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
mBrowserBox = new BrowserBox;
mScrollArea = new ScrollArea(mBrowserBox);
mLabel = new Label(_("Connecting..."));
- mProgressBar = new ProgressBar(0.0, 310, 20);
+ mProgressBar = new ProgressBar(0.0, 310, 20, Theme::PROG_DOWNLOAD);
mCancelButton = new Button(_("Cancel"), "cancel", this);
mPlayButton = new Button(_("Play"), "play", this);
diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp
index 4b46b003..dde7bb3c 100644
--- a/src/resources/theme.cpp
+++ b/src/resources/theme.cpp
@@ -514,7 +514,8 @@ static int readProgressType(const std::string &type)
"EXP",
"INVY_SLOTS",
"WEIGHT",
- "JOB"
+ "JOB",
+ "DOWNLOAD"
};
if (type.empty())
diff --git a/src/resources/theme.h b/src/resources/theme.h
index 9c1ec293..98904518 100644
--- a/src/resources/theme.h
+++ b/src/resources/theme.h
@@ -172,6 +172,7 @@ class Theme : public Palette, public EventListener
PROG_INVY_SLOTS,
PROG_WEIGHT,
PROG_JOB,
+ PROG_DOWNLOAD,
THEME_PROG_END
};