summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 15:58:18 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:05 +0300
commit697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce (patch)
treee5cbf0d91a689a598193c7b7a292e7c711c49fdc /src/gui/widgets
parent60add2c149c9c61bfbede5ae92cfe216927aca8a (diff)
downloadmv-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.gz
mv-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.bz2
mv-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.xz
mv-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.zip
Remove textrenderer class.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/textpreview.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 8468da782..00ce7f42a 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -24,7 +24,6 @@
#include "client.h"
#include "configuration.h"
-#include "textrenderer.h"
#include "gui/gui.h"
#include "gui/sdlfont.h"
@@ -110,9 +109,16 @@ void TextPreview::draw(gcn::Graphics* graphics)
}
}
- TextRenderer::renderText(graphics, mText, mPadding + 1, mPadding + 1,
- gcn::Graphics::LEFT, gcn::Color(mTextColor->r, mTextColor->g,
- mTextColor->b, alpha), mFont, mOutline, mShadow);
+ graphics->setColor(gcn::Color(mTextColor->r, mTextColor->g,
+ mTextColor->b, alpha));
+
+ if (mOutline)
+ {
+ Graphics *const g = static_cast<Graphics *const>(graphics);
+ g->setColor2(Theme::getThemeColor(Theme::OUTLINE));
+ }
+
+ mFont->drawString(graphics, mText, mPadding + 1, mPadding + 1);
BLOCK_END("TextPreview::draw")
}