James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.57k stars 525 forks source link

PDF viewer page frames do not follow the pageColorsForeground setting #3487

Closed stepelu closed 1 year ago

stepelu commented 1 year ago

Describe the bug

When setting custom colors for PDF rendering the PDF viewer page (and trimming) frames are not changed accordingly.

For example, setting the following options in settings.json:

  "latex-workshop.view.pdf.color.dark.backgroundColor": "#282c34",
  "latex-workshop.view.pdf.color.dark.pageColorsBackground": "#282c34",
  "latex-workshop.view.pdf.color.dark.pageColorsForeground": "#abb2bf",

produces the following result (this with 10% trimming, without trimming the white vertical frames disappear):

image

This is not an issue when using inversion, the following image is produced with "latex-workshop.view.pdf.invert": 0.85

image

To Reproduce

Use the settings above in settings.json and view a PDF.

Expected behavior

It would be great if "latex-workshop.view.pdf.color.dark.pageColorsForeground" (or a dimmed version of it) were used for the page frames, which otherwise really stand out visually.

Desktop

Please write exact version numbers. Please don't write latest instead of exact numbers.

James-Yu commented 1 year ago

Can you please have a try on #3488? Thanks. You may change the extension of the following file from zip to vsix to install it.

latex-workshop-8.29.0.zip

stepelu commented 1 year ago

I renamed the zip to vsix and installed via code --install-extension latex-workshop-8.29.0.vsix:

Installing extensions...
(node:93601) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Electron --trace-deprecation ...` to show where the warning was created)
Extension 'latex-workshop-8.29.0.vsix' was successfully installed.

However the "latex-workshop.view.pdf.color.dark.pageBorderColor" setting is grayed out and seems not to have an effect. I tried the obvious candidates (install while vscode is closed, reload, ecc ecc), any idea on what could be going wrong?