summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-07-26 22:34:34 +0200
committerBertram <bertram@cegetel.net>2009-07-26 22:34:34 +0200
commit7bc30f545784b26594803b559f1d76d5434027ea (patch)
tree134d20a14c0fec6c49c1ae72edbc2955c34204bd /src/gui
parentc98665d62a089c978189662c3f526464365f08fa (diff)
downloadmana-client-7bc30f545784b26594803b559f1d76d5434027ea.tar.gz
mana-client-7bc30f545784b26594803b559f1d76d5434027ea.tar.bz2
mana-client-7bc30f545784b26594803b559f1d76d5434027ea.tar.xz
mana-client-7bc30f545784b26594803b559f1d76d5434027ea.zip
Fixed a '+' string operation, and attempt to resolve the Mantis 427.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/desktop.cpp19
-rw-r--r--src/gui/widgets/desktop.h3
2 files changed, 20 insertions, 2 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 6633d2ce..4583ef13 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -32,6 +32,9 @@
#include "log.h"
#include "main.h"
+#define VERSION_LABEL_X 25
+#define VERSION_LABEL_Y 2
+
Desktop::Desktop()
: mWallpaper(0)
{
@@ -40,7 +43,16 @@ Desktop::Desktop()
Wallpaper::loadWallpapers();
gcn::Label *versionLabel = new Label(FULL_VERSION);
- add(versionLabel, 25, 2);
+ 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);
}
Desktop::~Desktop()
@@ -84,6 +96,11 @@ void Desktop::draw(gcn::Graphics *graphics)
getWidth(), getHeight(), false);
}
+ // Draw a thin border under the application version...
+ g->drawImagePattern(mVersionBorder, mVersionRectangle.x, mVersionRectangle.y,
+ mVersionRectangle.width,
+ mVersionRectangle.height);
+
Container::draw(graphics);
}
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index ad04ee96..267acead 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -59,7 +59,8 @@ class Desktop : public Container, gcn::WidgetListener
private:
void setBestFittingWallpaper();
- Image *mWallpaper;
+ Image *mWallpaper, *mVersionBorder;
+ gcn::Rectangle mVersionRectangle;
};
#endif // DESKTOP_H