StringGridWidget bugfix: cell backgrounds now clip inside the grid's client area

This commit is contained in:
Donny Viszneki 2014-08-18 23:20:00 -07:00
parent 1b11e24f05
commit 5ef2a719f3
1 changed files with 4 additions and 4 deletions

View File

@ -946,14 +946,14 @@ class GridWidgetBase : WidgetGroup, OnScrollHandler {
bool isHeader = x < _headerCols || y < _headerRows;
if (phase == 0) {
if (isHeader)
drawHeaderCellBackground(buf, cellRect, x - _headerCols, y - _headerRows);
drawHeaderCellBackground(buf, buf.clipRect, x - _headerCols, y - _headerRows);
else
drawCellBackground(buf, cellRect, x - _headerCols, y - _headerRows);
drawCellBackground(buf, buf.clipRect, x - _headerCols, y - _headerRows);
} else {
if (isHeader)
drawHeaderCell(buf, cellRect, x - _headerCols, y - _headerRows);
drawHeaderCell(buf, buf.clipRect, x - _headerCols, y - _headerRows);
else
drawCell(buf, cellRect, x - _headerCols, y - _headerRows);
drawCell(buf, buf.clipRect, x - _headerCols, y - _headerRows);
}
}
}