vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
643 stars 90 forks source link

dark-mode-minor-mode not working #163

Closed armindarvish closed 2 years ago

armindarvish commented 2 years ago

Today, I started seeing an issue with the dark-mode. Basically, the pdf-view-dark-minor-mode does not have any effect on rendering. I can still right-click and use the rendering option to turn dark-mode on or off, but using the minor-mode just does not work! I am on MacOS, by the way.

You can see in the screenshots below with both "pdf-view-dark-minor-mode" equal to nil or t, the render setting is the same, and when I uncheck the render midnight option by mouse, it does not have any effect on the minor mode variable, either!

SC1: dark-minor-mode is t and render is dark

image

SC2: turned dark-minor-mode off but render is still dark

image

SC3: used the context menu to uncheck the midnight option and render is light but the minor mode is unaffected!

image
vedang commented 2 years ago

I think what you are looking for is M-x pdf-view-midnight-minor-mode.

Re: pdf-view-dark-minor-mode, the name does not make sense the way we think about dark-mode / light-mode today. It's meant specifically for PDFs which have dark backgrounds (instead of the white background that most PDFs have). I will look into improving documentation around it / renaming it in the future.

armindarvish commented 2 years ago

I think what you are looking for is M-x pdf-view-midnight-minor-mode.

Re: pdf-view-dark-minor-mode, the name does not make sense the way we think about dark-mode / light-mode today. It's meant specifically for PDFs which have dark backgrounds (instead of the white background that most PDFs have). I will look into improving documentation around it / renaming it in the future.

Thanks for the quick response. Yes, that was it, I was confusing midnight-minor-mode with dark-minor-mode!