From 0975dc4cd9012b098061f0201028896d578649f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Jan 2014 13:47:32 +0300 Subject: Remove duplicate variables from some classes. --- src/gui/widgets/progressbar.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets/progressbar.cpp') 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; -- cgit v1.2.3-60-g2f50