diff options
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") |