restore gradient glow wash behind border

This commit is contained in:
Damocles 2026-04-12 21:27:46 +02:00
parent 49513b7ff2
commit d33b47139a

View file

@ -40,6 +40,24 @@ PanelWindow {
ctx.clearRect(0, 0, w, h);
// Glow wash behind the border
const glowGrad = ctx.createLinearGradient(0, 0, w, 0);
glowGrad.addColorStop(0, M.Theme.base0C.toString());
glowGrad.addColorStop(1, M.Theme.base09.toString());
ctx.globalAlpha = 0.25;
ctx.fillStyle = glowGrad;
ctx.fillRect(0, 0, w, h);
// Erase glow towards bottom
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "destination-out";
const glowFade = ctx.createLinearGradient(0, 0, 0, h);
glowFade.addColorStop(0, "transparent");
glowFade.addColorStop(1, "black");
ctx.fillStyle = glowFade;
ctx.fillRect(0, 0, w, h);
ctx.globalCompositeOperation = "source-over";
// Horizontal gradient for the border
const grad = ctx.createLinearGradient(0, 0, w, 0);
grad.addColorStop(0, M.Theme.base0C.toString());