mirror of https://github.com/buggins/dlangui.git
StringGridWidget bugfix: cell backgrounds now clip inside the grid's client area
This commit is contained in:
parent
1b11e24f05
commit
5ef2a719f3
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue