SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

Dark mode detection sometimes unreliable in auto mode

Open i0ntempest opened this issue 3 years ago • 7 comments

I've noticed this for a pretty long time, sometimes the quicklook window shows the dark appearance even when the system appearance is light (in auto mode). Manually switching to either light or dark mode will temporarily fix the issue, but may reoccur after another automated appearance change. EDIT: More specifically, I think it happens if I shutdown the system at night and start it up again in the morning. Then the appearance would not follow the system. Screen Shot 2022-04-19 at 13 04 27

i0ntempest avatar Apr 19 '22 17:04 i0ntempest

When does the problem occur?

  • when there is a quick look preview opened and the system changes style

or

  • shortly after the system changes style when you open a new quicklook preview?

in the first case it is a known problem that would take too much work to solve. Just close the preview, wait a bit for the cache to clear (or request a preview of another file), and reopen the preview to view the correct style.

In the second case, if the file was recently previewed, the previous style view may still be in the cache.

sbarex avatar Apr 25 '22 14:04 sbarex

It's neither of those. I think it happens if I shutdown the system at night (dark appearance) and start it up again in the morning (light appearance). Resetting quicklookd and quicklook cache does not help, newly generated previews are still using the wrong appearance. If system appearance changes (say by manually changing the time zone), it will start using the correct appearance.

i0ntempest avatar Apr 25 '22 18:04 i0ntempest

What version of macOS do you use?

sbarex avatar Apr 25 '22 18:04 sbarex

Newest release 12.3.1

i0ntempest avatar Apr 25 '22 18:04 i0ntempest

Try the release 2.1.12 (61).

sbarex avatar May 16 '22 06:05 sbarex

Tried for a few days, looks like the problem was fixed. Thanks!

i0ntempest avatar May 21 '22 21:05 i0ntempest

Hey, I noticed a few times of this reoccurring, though the nature of the problem changed a bit. Sometimes it just stucks in the wrong appearance, with a reboot being the only way to fix it. Resetting quicklookd and quicklook cache does not help just like before but what's new is manually changing system appearance does not work either now. Maybe a relogin will also fix it but I haven't tried, and it definitely occurs less frequent than before.

i0ntempest avatar Jun 24 '22 07:06 i0ntempest