CodeEditApp / CodeEdit

CodeEdit App for macOS – Elevate your code editing experience. Open source, free forever.
https://codeedit.app
MIT License
20.99k stars 1.01k forks source link

🐞 Auto change theme is not working properly #1746

Open nervenes opened 3 months ago

nervenes commented 3 months ago

Description

hi, there seems to be something wrong with the auto change theme mode, it keeps putting dark mode when i have light mode enabled, i have to manually turn it off and on again for it to detect light mode.

To Reproduce

I'm not sure how you can reproduce this

Expected Behavior

To detect my systems preffered theme mode when I start up the app

Version Information

CodeEdit: Version 0.1.0-alpha (38) macOS: 14.5 (23F79)

Additional Context

No response

Screenshots

https://github.com/CodeEditApp/CodeEdit/assets/146845123/e921e5f3-6020-4c48-b3c7-ed8efd46f206

webbrowser11 commented 3 months ago

i am on windows so i can not fix it but if someone else has a branch and uses macOS i might be able to get in contact about this issue.

nervenes commented 3 months ago

im up to it if you know what do (because I have no idea), might be fun for me to watch you do it as i might learn something.

webbrowser11 commented 3 months ago

is it a setting?

so i don't see anything in the themes folder if its a setting that might connect to a config folder so... tell me if its a setting in the meanwhile i will look through some more files.

nervenes commented 3 months ago

the "automatically change theme based on system appearance" is a setting, if that's what you're asking for.

nervenes commented 3 months ago

Should find something at CodeEdit/Features/Settings/ThemeSettings

nervenes commented 3 months ago

It's very hard to reproduce though, just ran a clean build of code edit and the editor pane and the terminal pane was light mode while the rest was dark mode, the detect system appearance option was enabled, I reenabled it and it solved it. I quit Xcode, cleaned the build directory, and ran a clean build again but this time it worked.

webbrowser11 commented 3 months ago

https://github.com/CodeEditApp/CodeEdit/tree/main/CodeEdit/Features/Settings/Pages/ThemeSettings found it! i dont see ANYTHING that has to do with automation yet but i am looking!

webbrowser11 commented 3 months ago

here: looking for bugs now! https://github.com/CodeEditApp/CodeEdit/blob/main/CodeEdit/Features/Settings/Pages/ThemeSettings/Models/ThemeSettings.swift

webbrowser11 commented 3 months ago

i only found a few things to fix here but i do not know if anything here is what matches your bug, but this: /// Use the system background that matches the appearance setting var useThemeBackground: Bool = true that is the only thing that controls this other then the SYSTEM FILE that controls the exact same thing. so something may be wrong with that i may fork this to fix my new script that should fix some errors but not necessarily the bug you are looking to fix.

webbrowser11 commented 3 months ago

here is my fixed

webbrowser11 commented 3 months ago

here is my fixed version: https://github.com/webbrowser11/CodeEditbugfix/blob/main/CodeEdit/Features/Settings/Pages/ThemeSettings/Models/ThemeSettings.swift

webbrowser11 commented 3 months ago

i am not sure if that is what you were looking to fix so i am NOT making a pull request