summaryrefslogtreecommitdiff
path: root/src/gui/widgets/desktop.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-08-06 21:26:54 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-08-06 21:28:05 +0200
commit5f35db151850a9ac318743bccfeb20711af5de8d (patch)
tree596b5b9cbf934a594ec4785d7afcab04259911e6 /src/gui/widgets/desktop.cpp
parent1bb0f3699b269e0064bb4397ff4d1ddc6b38c1fa (diff)
downloadmana-5f35db151850a9ac318743bccfeb20711af5de8d.tar.gz
mana-5f35db151850a9ac318743bccfeb20711af5de8d.tar.bz2
mana-5f35db151850a9ac318743bccfeb20711af5de8d.tar.xz
mana-5f35db151850a9ac318743bccfeb20711af5de8d.zip
Use fillRectangle instead of tiling a colored image
Diffstat (limited to 'src/gui/widgets/desktop.cpp')
-rw-r--r--src/gui/widgets/desktop.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 4583ef13..13ac866a 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -32,9 +32,6 @@
#include "log.h"
#include "main.h"
-#define VERSION_LABEL_X 25
-#define VERSION_LABEL_Y 2
-
Desktop::Desktop()
: mWallpaper(0)
{
@@ -42,17 +39,9 @@ Desktop::Desktop()
Wallpaper::loadWallpapers();
- gcn::Label *versionLabel = new Label(FULL_VERSION);
- add(versionLabel, VERSION_LABEL_X, VERSION_LABEL_Y);
-
- mVersionRectangle.x = VERSION_LABEL_X;
- mVersionRectangle.y = VERSION_LABEL_Y;
- mVersionRectangle.width = versionLabel->getWidth();
- mVersionRectangle.height = versionLabel->getHeight();
-
- // Loads a white pattern and make it translucent...
- mVersionBorder = Image::getColoredPattern(0xFF, 0xFF, 0xFF);
- mVersionBorder->setAlpha(0.5f);
+ mVersionLabel = new Label(FULL_VERSION);
+ mVersionLabel->setBackgroundColor(gcn::Color(255, 255, 255, 128));
+ add(mVersionLabel, 25, 2);
}
Desktop::~Desktop()
@@ -97,9 +86,8 @@ void Desktop::draw(gcn::Graphics *graphics)
}
// Draw a thin border under the application version...
- g->drawImagePattern(mVersionBorder, mVersionRectangle.x, mVersionRectangle.y,
- mVersionRectangle.width,
- mVersionRectangle.height);
+ g->setColor(gcn::Color(255, 255, 255, 128));
+ g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension()));
Container::draw(graphics);
}
@@ -128,7 +116,7 @@ void Desktop::setBestFittingWallpaper()
ResourceManager::getInstance()->addResource(idPath, newRsclWlPpr);
mWallpaper = newRsclWlPpr;
}
- else
+ else
mWallpaper = nWallPaper;
}
else