Dark mode doesn't always sync with system settings
simprecicchiani opened this issue · 12 comments
It behaves correctly when switching between modes. The issue is presented when shutted down and then started with different appearance mode. (I'm on 1.7.1, I'll try the latest release and report back)
I've created a possible fix. Please check if this error still occurs. This fix is a bit hacky. It checks inside the rendering thread if darkmode is enabled. Normally you dont do it because it could cause shuttering in the rendering of the hud.
I don't really know how to test it because it happens when I shut down the computer in the evening and start it the next morning. I can provide a feedback not earlier than tomorrow.
I don't really know how to test it because it happens when I shut down the computer in the evening and start it the next morning. I can provide a feedback not earlier than tomorrow.
I've just experienced the same issue this morning as @simprecicchiani described. It reproduces only in the morning when you are using automantic system appearance.
I've created a possible fix. Please check if this error still occurs. This fix is a bit hacky. It checks inside the rendering thread if darkmode is enabled. Normally you dont do it because it could cause shuttering in the rendering of the hud.
It looks like that it doesn't solve this issue. I quit the official release and replaced this one and run, the hud is still in dark mode. I assume that TA needs to find out what the current system mode is when it starts or every time before HUD shows. It got to be a user level variable to save the system mode status.
i agree as well, the problem is present, last time i used it was night time and dark mode was on automatically and the HUD was dark as well which is fine, today (daytime) system was set to white/light theme automatically because it was daytime and when i pressed the backlight key, i noticed the HUD was still dark instead of white as the theme is.
Would you be able to implement a method (maybe in your App Delegate or something) that checks for sleep/wake to check the status of dark mode? I'm thinking you could watch for this notification:
https://developer.apple.com/documentation/appkit/nsworkspacedidwakenotification
And then you can determine dark mode using a method described in one of the answers here, using NSAppearance:
https://stackoverflow.com/questions/51672124/how-can-dark-mode-be-detected-on-macos-10-14
(I'm an iOS developer with strong Objective-C knowledge -- very little Swift experience -- so disregard this comment if I'm completely off base.)
Thx for the hint! As recommended by @joshuaseltzer I enhanced the code that detects which theme is currently active. This bug is fixed with v1.7.3
Glad I was able to provide some useful hints! If I knew Swift I would have tried it myself and submitted a PR.
Tested today in the morning & it worked for me as intended!
Tested today in the morning & it worked for me as intended!
Tested today as well, just a few minutes before Dark mode will turn on automatically, as soon as it turned on while using the laptop, i tested and it's working perfect.
Thank you @joshuaseltzer @MSzturc