diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-18 20:02:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-18 20:02:27 +0300 |
commit | fb5d0e7762f692948dddebd3deb38a0bd20de5f2 (patch) | |
tree | afe2c0d8cf75738fd847af37dc166e0c338f7493 /src/gui/widgets/progressbar.cpp | |
parent | 8a5603e487f682f5f67bc2cedae81249aa138f5b (diff) | |
parent | e9e343366fbfbe9a6343089ff113354524f3f306 (diff) | |
download | plus-fb5d0e7762f692948dddebd3deb38a0bd20de5f2.tar.gz plus-fb5d0e7762f692948dddebd3deb38a0bd20de5f2.tar.bz2 plus-fb5d0e7762f692948dddebd3deb38a0bd20de5f2.tar.xz plus-fb5d0e7762f692948dddebd3deb38a0bd20de5f2.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/widgets/progressbar.cpp')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 97c29bd8c..aecb323f8 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -46,10 +46,7 @@ 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)), + mBackgroundColorToGo(), mText(), mVertexes(new ImageCollection), mProgressPalette(backColor), @@ -60,6 +57,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; |