summaryrefslogtreecommitdiff
path: root/src/gui/widgets/desktop.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
commitca9fac131283ed536971799bef0d1fff4ef8adc1 (patch)
treeec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/desktop.cpp
parent29f929794c7519b049de0be3af635f05d7e83be6 (diff)
downloadmv-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.cpp17
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")