diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-22 21:16:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-22 21:16:34 +0300 |
commit | 2d17967845119a77aec6388bb27c47339052704a (patch) | |
tree | 965b636cf677ddf93a30e8606405594a79b7f105 /src/gui/widgets/desktop.cpp | |
parent | 7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (diff) | |
download | manaverse-2d17967845119a77aec6388bb27c47339052704a.tar.gz manaverse-2d17967845119a77aec6388bb27c47339052704a.tar.bz2 manaverse-2d17967845119a77aec6388bb27c47339052704a.tar.xz manaverse-2d17967845119a77aec6388bb27c47339052704a.zip |
Improve draw perfomance.
Add new theme color DROPDOWN_SHADOW.
Diffstat (limited to 'src/gui/widgets/desktop.cpp')
-rw-r--r-- | src/gui/widgets/desktop.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index 40d90ba11..46240f76d 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -56,6 +56,9 @@ Desktop::Desktop() : mVersionLabel->setBackgroundColor( Theme::getThemeColor(Theme::BACKGROUND, 128)); add(mVersionLabel, 25, 2); + + mBackgroundColor = Theme::getThemeColor(Theme::BACKGROUND, 128); + mBackgroundGrayColor = Theme::getThemeColor(Theme::BACKGROUND_GRAY); } Desktop::~Desktop() @@ -85,8 +88,7 @@ void Desktop::draw(gcn::Graphics *graphics) if (!mWallpaper || (getWidth() > mWallpaper->getWidth() || getHeight() > mWallpaper->getHeight())) { - // TODO: Color from palette - g->setColor(Theme::getThemeColor(Theme::BACKGROUND_GRAY)); + g->setColor(mBackgroundGrayColor); g->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -107,7 +109,7 @@ void Desktop::draw(gcn::Graphics *graphics) } // Draw a thin border under the application version... - g->setColor(Theme::getThemeColor(Theme::BACKGROUND, 128)); + g->setColor(mBackgroundColor); g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); Container::draw(graphics); |