summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-16 15:41:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-16 15:41:51 +0300
commit1b75e974088a94cd28d7a48729545904b2cd908b (patch)
treed771752fd0da4c58c8ff2d941c47274ead984e42 /src/gui/widgets
parent46087564d4184b28740b0c45c1bac199ab1942ec (diff)
downloadplus-1b75e974088a94cd28d7a48729545904b2cd908b.tar.gz
plus-1b75e974088a94cd28d7a48729545904b2cd908b.tar.bz2
plus-1b75e974088a94cd28d7a48729545904b2cd908b.tar.xz
plus-1b75e974088a94cd28d7a48729545904b2cd908b.zip
Remove some useless static methods from theme.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/textpreview.cpp2
-rw-r--r--src/gui/widgets/widget2.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 45e71b800..ff0a647b8 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -116,7 +116,7 @@ void TextPreview::draw(Graphics* graphics)
Color(mTextColor2->r, mTextColor2->g, mTextColor2->b, alpha));
if (mOutline && mTextColor != mTextColor2)
- graphics->setColor2(Theme::getThemeColor(Theme::OUTLINE));
+ graphics->setColor2(getThemeColor(Theme::OUTLINE, 255));
mFont->drawString(graphics, mText, mPadding + 1, mPadding + 1);
BLOCK_END("TextPreview::draw")
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index ff565815f..2d73418ba 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -36,16 +36,18 @@ class Widget2
const int alpha = 255)
const A_WARN_UNUSED
{
- return Theme::getThemeColor(mPaletteOffset + type, alpha);
+ return theme->getColor(mPaletteOffset + type, alpha);
}
inline const Color &getThemeCharColor(const signed char c,
bool &valid)
const A_WARN_UNUSED
{
- const int colorId = Theme::getThemeIdByChar(c, valid);
+ if (!theme)
+ return Palette::BLACK;
+ const int colorId = theme->getIdByChar(c, valid);;
if (valid)
- return Theme::getThemeColor(mPaletteOffset + colorId);
+ return theme->getColor(mPaletteOffset + colorId, 255);
else
return Palette::BLACK;
}