diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-22 21:16:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-22 21:16:34 +0300 |
commit | 2d17967845119a77aec6388bb27c47339052704a (patch) | |
tree | 965b636cf677ddf93a30e8606405594a79b7f105 /src/gui/widgets/browserbox.cpp | |
parent | 7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (diff) | |
download | manaverse-2d17967845119a77aec6388bb27c47339052704a.tar.gz manaverse-2d17967845119a77aec6388bb27c47339052704a.tar.bz2 manaverse-2d17967845119a77aec6388bb27c47339052704a.tar.xz manaverse-2d17967845119a77aec6388bb27c47339052704a.zip |
Improve draw perfomance.
Add new theme color DROPDOWN_SHADOW.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 7df70bd04..bb83c1159 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -64,6 +64,10 @@ BrowserBox::BrowserBox(unsigned int mode, bool opaque): { setFocusable(true); addMouseListener(this); + + mBackgroundColor = Theme::getThemeColor(Theme::BACKGROUND); + mHighlightColor = Theme::getThemeColor(Theme::HIGHLIGHT); + mHyperLinkColor = Theme::getThemeColor(Theme::HYPERLINK); } BrowserBox::~BrowserBox() @@ -310,7 +314,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) if (mOpaque) { - graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND)); + graphics->setColor(mBackgroundColor); graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -319,7 +323,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) { if ((mHighMode & BACKGROUND)) { - graphics->setColor(Theme::getThemeColor(Theme::HIGHLIGHT)); + graphics->setColor(mHighlightColor); graphics->fillRectangle(gcn::Rectangle( mLinks[mSelectedLink].x1, mLinks[mSelectedLink].y1, @@ -330,7 +334,7 @@ void BrowserBox::draw(gcn::Graphics *graphics) if ((mHighMode & UNDERLINE)) { - graphics->setColor(Theme::getThemeColor(Theme::HYPERLINK)); + graphics->setColor(mHyperLinkColor); graphics->drawLine( mLinks[mSelectedLink].x1, mLinks[mSelectedLink].y2, |