diff options
-rw-r--r-- | src/gui/widgets/desktop.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index 455b36554..bee1c76e6 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -88,17 +88,17 @@ void Desktop::draw(gcn::Graphics *graphics) const gcn::Rectangle &rect = mDimension; const int width = rect.width; const int height = rect.height; - const int wallpWidth = mWallpaper->getWidth(); - const int wallpHeight = mWallpaper->getHeight(); - - if (!mWallpaper || (width > wallpWidth || height > wallpHeight)) - { - g->setColor(mBackgroundGrayColor); - g->fillRectangle(gcn::Rectangle(0, 0, width, height)); - } - if (mWallpaper) { + const int wallpWidth = mWallpaper->getWidth(); + const int wallpHeight = mWallpaper->getHeight(); + + if (width > wallpWidth || height > wallpHeight) + { + g->setColor(mBackgroundGrayColor); + g->fillRectangle(gcn::Rectangle(0, 0, width, height)); + } + if (!imageHelper->useOpenGL()) { g->drawImage(mWallpaper, @@ -112,6 +112,11 @@ void Desktop::draw(gcn::Graphics *graphics) width, height, false); } } + else + { + g->setColor(mBackgroundGrayColor); + g->fillRectangle(gcn::Rectangle(0, 0, width, height)); + } // Draw a thin border under the application version... g->setColor(mBackgroundColor); |