diff options
author | Bertram <bertram@cegetel.net> | 2009-07-26 22:34:34 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-07-26 22:34:34 +0200 |
commit | 7bc30f545784b26594803b559f1d76d5434027ea (patch) | |
tree | 134d20a14c0fec6c49c1ae72edbc2955c34204bd /src/gui/widgets | |
parent | c98665d62a089c978189662c3f526464365f08fa (diff) | |
download | mana-7bc30f545784b26594803b559f1d76d5434027ea.tar.gz mana-7bc30f545784b26594803b559f1d76d5434027ea.tar.bz2 mana-7bc30f545784b26594803b559f1d76d5434027ea.tar.xz mana-7bc30f545784b26594803b559f1d76d5434027ea.zip |
Fixed a '+' string operation, and attempt to resolve the Mantis 427.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/desktop.cpp | 19 | ||||
-rw-r--r-- | src/gui/widgets/desktop.h | 3 |
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 |