From 5ef2a719f3b231ffdaaa92fdfaff2f6199f53756 Mon Sep 17 00:00:00 2001 From: Donny Viszneki Date: Mon, 18 Aug 2014 23:20:00 -0700 Subject: [PATCH] StringGridWidget bugfix: cell backgrounds now clip inside the grid's client area --- src/dlangui/widgets/grid.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } } }