CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

🐞 Auto change theme is not working properly

Open ghost opened this issue 1 year ago • 12 comments

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

ghost avatar Jun 03 '24 15:06 ghost

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.

webbrowser11 avatar Jun 23 '24 20:06 webbrowser11

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.

ghost avatar Jun 23 '24 20:06 ghost

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.

webbrowser11 avatar Jun 23 '24 23:06 webbrowser11

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

ghost avatar Jun 23 '24 23:06 ghost

Should find something at CodeEdit/Features/Settings/ThemeSettings

ghost avatar Jun 24 '24 00:06 ghost

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.

ghost avatar Jun 24 '24 00:06 ghost

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 avatar Jun 24 '24 00:06 webbrowser11

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

webbrowser11 avatar Jun 24 '24 00:06 webbrowser11

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 avatar Jun 24 '24 00:06 webbrowser11

here is my fixed

webbrowser11 avatar Jun 24 '24 00:06 webbrowser11

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

webbrowser11 avatar Jun 24 '24 00:06 webbrowser11

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

webbrowser11 avatar Jun 24 '24 00:06 webbrowser11