Skip to content

Commit

Permalink
remove some blending most of the time
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Jan 15, 2024
1 parent eebab49 commit e600d10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/internal/data-grid/data-grid-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1665,20 +1665,23 @@ function overdrawStickyBoundaries(
const vColor = theme.borderColor;
const drawX = drawFreezeBorder ? getStickyWidth(effectiveCols) : 0;

let vStroke: string | undefined;
if (drawX !== 0) {
vStroke = blend(vColor, theme.bgCell);
ctx.beginPath();
ctx.moveTo(drawX + 0.5, 0);
ctx.lineTo(drawX + 0.5, height);
ctx.strokeStyle = blend(vColor, theme.bgCell);
ctx.strokeStyle = vStroke;
ctx.stroke();
}

if (freezeTrailingRows > 0) {
const hStroke = vColor === hColor && vStroke !== undefined ? vStroke : blend(hColor, theme.bgCell);
const h = getFreezeTrailingHeight(rows, freezeTrailingRows, getRowHeight);
ctx.beginPath();
ctx.moveTo(0, height - h + 0.5);
ctx.lineTo(width, height - h + 0.5);
ctx.strokeStyle = blend(hColor, theme.bgCell);
ctx.strokeStyle = hStroke;
ctx.stroke();
}
}
Expand Down

0 comments on commit e600d10

Please sign in to comment.