Re-order the names of the new pageColors options/preferences (PR 14874 follow-up)

Given that the new API-option is an Object named `pageColors`, with `background`/`foreground` keys, it occurred to me that it'd be slightly more consistent if the options/preferences names fully reflected that.
This commit is contained in:
Jonas Jenwald 2022-05-08 10:51:59 +02:00
parent f8838eb794
commit 39251c5789
3 changed files with 6 additions and 6 deletions

View File

@ -209,12 +209,12 @@
],
"default": -1
},
"pageBackgroundColor": {
"pageColorsBackground": {
"description": "The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
"type": "string",
"default": "Canvas"
},
"pageForegroundColor": {
"pageColorsForeground": {
"description": "The color is a string as defined in CSS. Its goal is to help improve readability in high contrast mode",
"type": "string",
"default": "CanvasText"

View File

@ -526,8 +526,8 @@ const PDFViewerApplication = {
maxCanvasPixels: AppOptions.get("maxCanvasPixels"),
enablePermissions: AppOptions.get("enablePermissions"),
pageColors: {
background: AppOptions.get("pageBackgroundColor"),
foreground: AppOptions.get("pageForegroundColor"),
background: AppOptions.get("pageColorsBackground"),
foreground: AppOptions.get("pageColorsForeground"),
},
});
pdfRenderingQueue.setViewer(this.pdfViewer);

View File

@ -129,12 +129,12 @@ const defaultOptions = {
compatibility: compatibilityParams.maxCanvasPixels,
kind: OptionKind.VIEWER,
},
pageBackgroundColor: {
pageColorsBackground: {
/** @type {string} */
value: "Canvas",
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
},
pageForegroundColor: {
pageColorsForeground: {
/** @type {string} */
value: "CanvasText",
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,