diff --git a/src/dlangui/widgets/grid.d b/src/dlangui/widgets/grid.d index 02eea97e..c0387fcc 100644 --- a/src/dlangui/widgets/grid.d +++ b/src/dlangui/widgets/grid.d @@ -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); } } }