godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Split the script editor syntax theme setting into two "dark" and "light" settings #2938

Open Calinou opened 3 years ago

Calinou commented 3 years ago

Describe the project you are working on

The Godot editor :slightly_smiling_face:

Describe the problem or limitation you are having in your project

The script editor's syntax theme is defined globally, for both dark and light editor theme presets. This means that if you use a syntax theme other than the default Adaptive (renamed to Default in master), the syntax theme will not change automatically to fit your editor theme choice. This is a problem when switching frequently between dark and light editor themes to fit the time of day, since you now have to change two settings instead of one. (The light theme is more readable under direct sunlight compared to the dark theme.)

In comparison, many IDEs such as Visual Studio Code allow you to change both the editor theme and syntax highlighting theme with a single setting (sometimes even a keyboard shortcut).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Split the script editor syntax theme setting into two settings. These two settings apply depending on the value of Interface > Theme > Icon And Font Color, which is automatically determined by the editor theme's background color by default.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Both new settings will source available themes from the same list as before, so the user can freely choose which themes to use (including the same theme for both dark and light editor themes, if they wish).

I started working on this feature but couldn't get it to work yet: https://github.com/Calinou/godot/tree/split-editor-theme-color-settings-dark-light

If this enhancement will not be used often, can it be worked around with a few lines of script?

This may be feasible with an editor plugin, but this is about improving editor usability for people who switch between themes to make the editor as readable as possible depending on lighting conditions.

Is there a reason why this should be core and not an add-on in the asset library?

See above.

atirut-w commented 3 years ago

This issue got me questioning why some people uses light theme to code.

Calinou commented 3 years ago

@atirut-w This is not the place to discuss why people use light themes for programming. They have proven benefits under direct sunlight, such as better readability :slightly_smiling_face:

atirut-w commented 3 years ago

They have proven benefits under direct sunlight

I see. Thanks.