summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-12-05 21:45:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-12-05 21:47:10 +0300
commit2d452dd8faf2529fda01913b0ab26f4a1f22ef3d (patch)
tree818e1d9aa3088deca6cdcd5df72858b3dec56a0c /src/gui/widgets
parent940161d95ee7c9e9ef4c6941d3d464d4264a94ad (diff)
downloadmanaverse-2d452dd8faf2529fda01913b0ab26f4a1f22ef3d.tar.gz
manaverse-2d452dd8faf2529fda01913b0ab26f4a1f22ef3d.tar.bz2
manaverse-2d452dd8faf2529fda01913b0ab26f4a1f22ef3d.tar.xz
manaverse-2d452dd8faf2529fda01913b0ab26f4a1f22ef3d.zip
A bit improve speed in getting color from theme.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 4af38bf67..7d30c10bf 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -79,6 +79,7 @@ BrowserBox::BrowserBox(unsigned int mode, bool opaque):
mColors[PURPLE] = Theme::getThemeColor(Theme::PURPLE);
mColors[GRAY] = Theme::getThemeColor(Theme::GRAY);
mColors[BROWN] = Theme::getThemeColor(Theme::BROWN);
+ setForegroundColor(Theme::getThemeColor(Theme::TEXT));
}
BrowserBox::~BrowserBox()
@@ -406,8 +407,8 @@ int BrowserBox::calcHeight()
char const *hyphen = "~";
int hyphenWidth = font->getWidth(hyphen);
- gcn::Color selColor = Theme::getThemeColor(Theme::TEXT);
- const gcn::Color textColor = Theme::getThemeColor(Theme::TEXT);
+ gcn::Color selColor = getForegroundColor();
+ const gcn::Color textColor = getForegroundColor();
ResourceManager *resman = ResourceManager::getInstance();
mLineParts.clear();