diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/checkbox.cpp | 14 | ||||
-rw-r--r-- | src/gui/progressbar.cpp | 11 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/gui/checkbox.cpp b/src/gui/checkbox.cpp index 7a3e2fde..413c28d0 100644 --- a/src/gui/checkbox.cpp +++ b/src/gui/checkbox.cpp @@ -46,13 +46,10 @@ CheckBox::CheckBox(const std::string& caption, bool selected): checkBoxChecked = checkBox->getSubImage(9, 0, 9, 10); checkBoxDisabled = checkBox->getSubImage(18, 0, 9, 10); checkBoxDisabledChecked = checkBox->getSubImage(27, 0, 9, 10); - if (config.getValue("opengl", 0)) - { - checkBoxNormal->setAlpha(mAlpha); - checkBoxChecked->setAlpha(mAlpha); - checkBoxDisabled->setAlpha(mAlpha); - checkBoxDisabledChecked->setAlpha(mAlpha); - } + checkBoxNormal->setAlpha(mAlpha); + checkBoxChecked->setAlpha(mAlpha); + checkBoxDisabled->setAlpha(mAlpha); + checkBoxDisabledChecked->setAlpha(mAlpha); checkBox->decRef(); } @@ -88,8 +85,7 @@ void CheckBox::drawBox(gcn::Graphics* graphics) else box = checkBoxDisabled; - if (config.getValue("guialpha", 0.8) != mAlpha && - config.getValue("opengl", 0)) + if (config.getValue("guialpha", 0.8) != mAlpha) { mAlpha = config.getValue("guialpha", 0.8); checkBoxNormal->setAlpha(mAlpha); diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 7463d4cc..bec86bb1 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -104,10 +104,7 @@ void ProgressBar::draw(gcn::Graphics *graphics) { if (config.getValue("guialpha", 0.8) != mAlpha) { - if (config.getValue("opengl", 0)) - mAlpha = config.getValue("guialpha", 0.8); - else - mAlpha = 1.0f; + mAlpha = config.getValue("guialpha", 0.8); for (int i = 0; i < 9; i++) { mBorder.grid[i]->setAlpha(mAlpha); @@ -120,7 +117,8 @@ void ProgressBar::draw(gcn::Graphics *graphics) const int alpha = (int)(mAlpha * 255.0f); // The bar - if (mProgress > 0) { + if (mProgress > 0) + { graphics->setColor(gcn::Color(mRed, mGreen, mBlue, alpha)); graphics->fillRectangle(gcn::Rectangle(4, 4, @@ -129,7 +127,8 @@ void ProgressBar::draw(gcn::Graphics *graphics) } // The label - if (!mText.empty()) { + if (!mText.empty()) + { gcn::Font *f = boldFont; const int textX = getWidth() / 2; const int textY = (getHeight() - f->getHeight()) / 2; |