summaryrefslogtreecommitdiff
path: root/src/gui/widgets/progressbar.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-08 13:47:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-08 14:39:55 +0300
commit0975dc4cd9012b098061f0201028896d578649f8 (patch)
treeccb3991a51ef9de47877a7d2549664d0f0ae4f79 /src/gui/widgets/progressbar.cpp
parent4a823c0ba94c620bd0e51fc61f22c068661946cf (diff)
downloadmv-0975dc4cd9012b098061f0201028896d578649f8.tar.gz
mv-0975dc4cd9012b098061f0201028896d578649f8.tar.bz2
mv-0975dc4cd9012b098061f0201028896d578649f8.tar.xz
mv-0975dc4cd9012b098061f0201028896d578649f8.zip
Remove duplicate variables from some classes.
Diffstat (limited to 'src/gui/widgets/progressbar.cpp')
-rw-r--r--src/gui/widgets/progressbar.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 97c29bd8c..6454cf47a 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -46,10 +46,6 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
mSkin(nullptr),
mProgress(progress),
mProgressToGo(progress),
- mBackgroundColor(Theme::getProgressColor(backColor >= 0
- ? backColor : 0, mProgress)),
- mBackgroundColorToGo(mBackgroundColor),
- mForegroundColor2(getThemeColor(Theme::PROGRESS_BAR_OUTLINE)),
mText(),
mVertexes(new ImageCollection),
mProgressPalette(backColor),
@@ -60,6 +56,11 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
mSmoothColorChange(true),
mRedraw(true)
{
+ mBackgroundColor = Theme::getProgressColor(backColor >= 0
+ ? backColor : 0, mProgress);
+ mBackgroundColorToGo = mBackgroundColor;
+ mForegroundColor2 = getThemeColor(Theme::PROGRESS_BAR_OUTLINE);
+
// The progress value is directly set at load time:
if (mProgress > 1.0F || mProgress < 0.0F)
mProgress = 1.0F;