From 2d452dd8faf2529fda01913b0ab26f4a1f22ef3d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 5 Dec 2011 21:45:05 +0300 Subject: A bit improve speed in getting color from theme. --- src/gui/widgets/browserbox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets') 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(); -- cgit v1.2.3-70-g09d2