summaryrefslogtreecommitdiff
path: root/src/gui/widgets/guitable.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-04 20:05:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-04 20:05:48 +0300
commit62ec17f6e489ec50f17219444468aeb8969dc961 (patch)
tree350d7edb5c26c282a4e1906544536d68831228ac /src/gui/widgets/guitable.cpp
parent71d924d7dcdac067f02a317e9353ee067dbd0bde (diff)
parentfd484fc70fca32ff9065b91c175089b65aa3fd26 (diff)
downloadmv-stripped1.1.9.4.tar.gz
mv-stripped1.1.9.4.tar.bz2
mv-stripped1.1.9.4.tar.xz
mv-stripped1.1.9.4.zip
Merge branch 'master' into strippedstripped1.1.9.4
Conflicts: data/fonts/mplus-1p-bold.ttf data/fonts/mplus-1p-regular.ttf src/guichan/basiccontainer.cpp src/guichan/include/guichan/basiccontainer.hpp src/guichan/widgets/window.cpp
Diffstat (limited to 'src/gui/widgets/guitable.cpp')
-rw-r--r--src/gui/widgets/guitable.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index e25e0bb8c..e02eda88c 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -88,17 +88,17 @@ void GuiTableActionListener::action(const gcn::ActionEvent
}
-GuiTable::GuiTable(TableModel *initial_model, gcn::Color background,
- bool opacity) :
+GuiTable::GuiTable(TableModel *initial_model, bool opacity) :
mLinewiseMode(false),
mWrappingEnabled(false),
mOpaque(opacity),
- mBackgroundColor(background),
mModel(NULL),
mSelectedRow(0),
mSelectedColumn(0),
mTopWidget(NULL)
{
+ mBackgroundColor = Theme::getThemeColor(Theme::BACKGROUND);
+ mHighlightColor = Theme::getThemeColor(Theme::HIGHLIGHT);
setModel(initial_model);
setFocusable(true);
@@ -292,8 +292,8 @@ void GuiTable::draw(gcn::Graphics* graphics)
if (mOpaque)
{
- graphics->setColor(Theme::getThemeColor(Theme::BACKGROUND,
- static_cast<int>(mAlpha * 255.0f)));
+ mBackgroundColor.a = static_cast<int>(mAlpha * 255.0f);
+ graphics->setColor(mBackgroundColor);
graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight()));
}
@@ -304,7 +304,7 @@ void GuiTable::draw(gcn::Graphics* graphics)
first_row = 0;
unsigned rows_nr = 1 + (getHeight() / getRowHeight()); // May overestimate
- // by one.
+ // by one.
unsigned max_rows_nr;
if (mModel->getRows() < first_row)
@@ -343,8 +343,8 @@ void GuiTable::draw(gcn::Graphics* graphics)
widget->setDimension(bounds);
- graphics->setColor(Theme::getThemeColor(Theme::HIGHLIGHT,
- static_cast<int>(mAlpha * 255.0f)));
+ mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
+ graphics->setColor(mHighlightColor);
if (mSelectedRow > 0)
{