diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
commit | ca9fac131283ed536971799bef0d1fff4ef8adc1 (patch) | |
tree | ec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/desktop.cpp | |
parent | 29f929794c7519b049de0be3af635f05d7e83be6 (diff) | |
download | mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2 mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip |
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/desktop.cpp')
-rw-r--r-- | src/gui/widgets/desktop.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index 4a4a73b53..b46fe3289 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -106,7 +106,6 @@ void Desktop::widgetResized(const gcn::Event &event A_UNUSED) void Desktop::draw(Graphics *graphics) { BLOCK_START("Desktop::draw") - Graphics *const g = static_cast<Graphics *const>(graphics); const gcn::Rectangle &rect = mDimension; const int width = rect.width; @@ -118,30 +117,30 @@ void Desktop::draw(Graphics *graphics) if (width > wallpWidth || height > wallpHeight) { - g->setColor(mBackgroundGrayColor); - g->fillRectangle(gcn::Rectangle(0, 0, width, height)); + graphics->setColor(mBackgroundGrayColor); + graphics->fillRectangle(gcn::Rectangle(0, 0, width, height)); } if (imageHelper->useOpenGL() == RENDER_SOFTWARE) { - g->drawImage2(mWallpaper, + graphics->drawImage2(mWallpaper, (width - wallpWidth) / 2, (height - wallpHeight) / 2); } else { - g->drawRescaledImage(mWallpaper, 0, 0, width, height); + graphics->drawRescaledImage(mWallpaper, 0, 0, width, height); } } else { - g->setColor(mBackgroundGrayColor); - g->fillRectangle(gcn::Rectangle(0, 0, width, height)); + graphics->setColor(mBackgroundGrayColor); + graphics->fillRectangle(gcn::Rectangle(0, 0, width, height)); } // Draw a thin border under the application version... - g->setColor(mBackgroundColor); - g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); + graphics->setColor(mBackgroundColor); + graphics->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); Container::draw(graphics); BLOCK_END("Desktop::draw") |