summaryrefslogtreecommitdiff
path: root/src/gui/table.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/table.cpp')
-rw-r--r--src/gui/table.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index 5fc96dbd..ec5b0480 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -319,11 +319,19 @@ void GuiTable::draw(gcn::Graphics* graphics)
widget->setDimension(bounds);
- if (!mLinewiseMode && c == mSelectedColumn && r == mSelectedRow)
+ graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT,
+ (int)(mAlpha * 255.0f)));
+
+ if (mLinewiseMode && r == mSelectedRow && c == 0)
+ {
+ graphics->fillRectangle(gcn::Rectangle(0, y_offset,
+ getWidth(), height));
+ }
+ else if (!mLinewiseMode &&
+ c == mSelectedColumn && r == mSelectedRow)
{
- graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT,
- (int)(mAlpha * 127.0f)));
- graphics->fillRectangle(bounds);
+ graphics->fillRectangle(gcn::Rectangle(x_offset, y_offset,
+ width, height));
}
graphics->pushClipArea(bounds);
@@ -334,14 +342,6 @@ void GuiTable::draw(gcn::Graphics* graphics)
x_offset += width;
}
- if (mLinewiseMode && r == mSelectedRow)
- {
- graphics->setColor(guiPalette->getColor(Palette::HIGHLIGHT,
- (int)(mAlpha * 127.0f)));
- graphics->fillRectangle(gcn::Rectangle(0, y_offset,
- x_offset, height));
- }
-
y_offset += height;
}