Use default colors only in forced-colors mode (bug 1778068)

This commit is contained in:
Calixte Denizet 2022-07-06 13:50:45 +02:00
parent 32d8c55642
commit fe93742c8f
3 changed files with 18 additions and 4 deletions

View file

@ -516,10 +516,14 @@ const PDFViewerApplication = {
const container = appConfig.mainContainer,
viewer = appConfig.viewerContainer;
const annotationEditorMode = AppOptions.get("annotationEditorMode");
const pageColors = {
background: AppOptions.get("pageColorsBackground"),
foreground: AppOptions.get("pageColorsForeground"),
};
const pageColors =
AppOptions.get("forcePageColors") ||
window.matchMedia("(forced-colors: active)").matches
? {
background: AppOptions.get("pageColorsBackground"),
foreground: AppOptions.get("pageColorsForeground"),
}
: null;
this.pdfViewer = new PDFViewer({
container,