summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-22 21:16:34 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-22 21:16:34 +0300
commit2d17967845119a77aec6388bb27c47339052704a (patch)
tree965b636cf677ddf93a30e8606405594a79b7f105 /src/gui/skilldialog.cpp
parent7bedfccf5982534a9cbcb2c18ca0d37df117bfc8 (diff)
downloadmv-2d17967845119a77aec6388bb27c47339052704a.tar.gz
mv-2d17967845119a77aec6388bb27c47339052704a.tar.bz2
mv-2d17967845119a77aec6388bb27c47339052704a.tar.xz
mv-2d17967845119a77aec6388bb27c47339052704a.zip
Improve draw perfomance.
Add new theme color DROPDOWN_SHADOW.
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 896f06cab..ff57195a9 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -152,7 +152,9 @@ public:
SkillListBox(SkillModel *model):
ListBox(model),
mModel(model),
- mPopup(new TextPopup())
+ mPopup(new TextPopup()),
+ mHighlightColor(Theme::getThemeColor(Theme::HIGHLIGHT)),
+ mTextColor(Theme::getThemeColor(Theme::TEXT))
{
}
@@ -187,8 +189,8 @@ public:
Graphics *graphics = static_cast<Graphics*>(gcnGraphics);
- graphics->setColor(Theme::getThemeColor(Theme::HIGHLIGHT,
- static_cast<int>(mAlpha * 255.0f)));
+ mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
+ graphics->setColor(mHighlightColor);
graphics->setFont(getFont());
// Draw filled rectangle around the selected list element
@@ -199,7 +201,7 @@ public:
}
// Draw the list elements
- graphics->setColor(Theme::getThemeColor(Theme::TEXT));
+ graphics->setColor(mTextColor);
for (int i = 0, y = 1;
i < model->getNumberOfElements();
++i, y += getRowHeight())
@@ -239,6 +241,8 @@ public:
private:
SkillModel *mModel;
TextPopup *mPopup;
+ gcn::Color mHighlightColor;
+ gcn::Color mTextColor;
};
class SkillTab : public Tab