diff --git a/browser/src/canvas/sections/ScrollSection.ts b/browser/src/canvas/sections/ScrollSection.ts index c68333668f06..a0717393d26c 100644 --- a/browser/src/canvas/sections/ScrollSection.ts +++ b/browser/src/canvas/sections/ScrollSection.ts @@ -417,9 +417,15 @@ export class ScrollSection extends CanvasSectionObject { private drawVerticalScrollBar (): void { var scrollProps: any = this.getVerticalScrollProperties(); + const isDarkBackground = this.map.uiManager.isBackgroundDark(); + const docType = this.sectionProperties.docLayer._docType; var startX = this.isRTL() ? this.sectionProperties.edgeOffset : this.size[0] - this.sectionProperties.scrollBarThickness - this.sectionProperties.edgeOffset; + if (isDarkBackground && (docType === 'text' || docType === 'drawing')) { + this.sectionProperties.scrollBarRailwayColor = 'transparent'; + } + if (this.sectionProperties.drawScrollBarRailway) { this.context.globalAlpha = this.sectionProperties.scrollBarRailwayAlpha; this.context.fillStyle = this.sectionProperties.scrollBarRailwayColor;