diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-06 18:03:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-06 20:52:08 +0300 |
commit | f0ae9007f666580259ca8c120f7aaee58a63f85a (patch) | |
tree | febc9da1d2ee1a5d3f85096727cd8c26d036ea5e /src/gui/widgets/progressbar.cpp | |
parent | f7c9165e0f59a33404a486c0b154a2c21ed9a9fa (diff) | |
download | mv-f0ae9007f666580259ca8c120f7aaee58a63f85a.tar.gz mv-f0ae9007f666580259ca8c120f7aaee58a63f85a.tar.bz2 mv-f0ae9007f666580259ca8c120f7aaee58a63f85a.tar.xz mv-f0ae9007f666580259ca8c120f7aaee58a63f85a.zip |
Fix code style.
Diffstat (limited to 'src/gui/widgets/progressbar.cpp')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 8b2beb8d5..4be421db4 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -211,24 +211,19 @@ void ProgressBar::render(Graphics *graphics, const gcn::Rectangle &area, if (*redraw || graphics->getRedraw()) { *redraw = false; - static_cast<Graphics*>(graphics)->calcWindow(vert, - area.x, area.y, area.width, area.height, mBorder); + graphics->calcWindow(vert, area.x, area.y, + area.width, area.height, mBorder); } - static_cast<Graphics*>(graphics)->drawImageRect2(vert, mBorder); - -// graphics->drawImageRect(area.x, area.y, area.width, area.height, mBorder); -// graphics->drawImageRect(area, mBorder); + graphics->drawImageRect2(vert, mBorder); // The bar if (progress > 0) { graphics->setColor(color); - graphics->fillRectangle(gcn::Rectangle(static_cast<int>(area.x + 4), - static_cast<int>(area.y + 4), - static_cast<int>(static_cast<float>(progress) - * static_cast<float>(area.width - 8)), - static_cast<int>(area.height - 8))); + graphics->fillRectangle(gcn::Rectangle(area.x + 4, area.y + 4, + static_cast<int>(progress * static_cast<float>(area.width - 8)), + area.height - 8)); } // The label @@ -260,11 +255,9 @@ void ProgressBar::render(Graphics *graphics, const gcn::Rectangle &area, if (progress > 0) { graphics->setColor(color); - graphics->fillRectangle(gcn::Rectangle(static_cast<int>(area.x + 4), - static_cast<int>(area.y + 4), - static_cast<int>(static_cast<float>(progress) - * static_cast<float>(area.width - 8)), - static_cast<int>(area.height - 8))); + graphics->fillRectangle(gcn::Rectangle(area.x + 4, area.y + 4, + static_cast<int>(progress * static_cast<float>(area.width - 8)), + area.height - 8)); } // The label |