From f0ae9007f666580259ca8c120f7aaee58a63f85a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 6 May 2012 18:03:52 +0300 Subject: Fix code style. --- src/gui/widgets/progressbar.cpp | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src/gui/widgets') 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)->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)->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(area.x + 4), - static_cast(area.y + 4), - static_cast(static_cast(progress) - * static_cast(area.width - 8)), - static_cast(area.height - 8))); + graphics->fillRectangle(gcn::Rectangle(area.x + 4, area.y + 4, + static_cast(progress * static_cast(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(area.x + 4), - static_cast(area.y + 4), - static_cast(static_cast(progress) - * static_cast(area.width - 8)), - static_cast(area.height - 8))); + graphics->fillRectangle(gcn::Rectangle(area.x + 4, area.y + 4, + static_cast(progress * static_cast(area.width - 8)), + area.height - 8)); } // The label -- cgit v1.2.3-70-g09d2