summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.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/textfield.cpp
parent7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (diff)
downloadmanaplus-2d17967845119a77aec6388bb27c47339052704a.tar.gz
manaplus-2d17967845119a77aec6388bb27c47339052704a.tar.bz2
manaplus-2d17967845119a77aec6388bb27c47339052704a.tar.xz
manaplus-2d17967845119a77aec6388bb27c47339052704a.zip
Improve draw perfomance.
Add new theme color DROPDOWN_SHADOW.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r--src/gui/widgets/textfield.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index f80039650..2729e5407 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -59,6 +59,8 @@ TextField::TextField(const std::string &text, bool loseFocusOnTab,
mLoseFocusOnTab = loseFocusOnTab;
+ setForegroundColor(Theme::getThemeColor(Theme::TEXT));
+
if (instances == 0)
{
// Load the skin
@@ -136,7 +138,7 @@ void TextField::draw(gcn::Graphics *graphics)
mXScroll);
}
- graphics->setColor(Theme::getThemeColor(Theme::TEXT));
+ graphics->setColor(getForegroundColor());
graphics->setFont(getFont());
graphics->drawText(mText, 1 - mXScroll, 1);
}