diff --git a/browser/src/canvas/sections/CalcGridSection.ts b/browser/src/canvas/sections/CalcGridSection.ts index a9631084f0f3..de94b6cb831d 100644 --- a/browser/src/canvas/sections/CalcGridSection.ts +++ b/browser/src/canvas/sections/CalcGridSection.ts @@ -29,6 +29,10 @@ class CalcGridSection extends app.definitions.canvasSectionObject { }; } + public resetStrokeStyle() { + this.sectionProperties.strokeStyle = getComputedStyle(document.body).getPropertyValue('--color-calc-grid'); + } + // repaintArea, paneTopLeft, canvasCtx onDrawArea(area?: Bounds, paneTopLeft?: any): void { if (!this.sectionProperties.docLayer.sheetGeometry) diff --git a/browser/src/control/Control.UIManager.js b/browser/src/control/Control.UIManager.js index e938950e1ea4..7fc442ebd57b 100644 --- a/browser/src/control/Control.UIManager.js +++ b/browser/src/control/Control.UIManager.js @@ -187,6 +187,12 @@ L.Control.UIManager = L.Control.extend({ if (!window.mode.isMobile()) this.refreshAfterThemeChange(); + if (app.map._docLayer._docType === 'spreadsheet') { + const calcGridSection = app.sectionContainer.getSectionWithName(L.CSections.CalcGrid.name); + if (calcGridSection) + calcGridSection.resetStrokeStyle(); + } + this.map.fire('themechanged'); },