summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-22 21:16:34 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-22 21:16:34 +0300
commit2d17967845119a77aec6388bb27c47339052704a (patch)
tree965b636cf677ddf93a30e8606405594a79b7f105 /src/gui/widgets/window.cpp
parent7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (diff)
downloadmanaverse-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/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 9a7c689e6..cdb9d3d55 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -95,6 +95,7 @@ Window::Window(const std::string &caption, bool modal, Window *parent,
addWidgetListener(this);
mCaptionFont = getFont();
+ setForegroundColor(Theme::getThemeColor(Theme::TEXT));
}
Window::~Window()
@@ -146,15 +147,10 @@ void Window::draw(gcn::Graphics *graphics)
g->drawImageRect2(mVertexes, mSkin->getBorder());
-/*
- g->drawImageRect(0, 0, getWidth(),
- getHeight(), mSkin->getBorder());
-*/
-
// Draw title
if (mShowTitle)
{
- g->setColor(Theme::getThemeColor(Theme::TEXT));
+ g->setColor(getForegroundColor());
g->setFont(mCaptionFont);
g->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
}