godot
godot copied to clipboard
Add conversion for common Theme Overrides
Fixes: https://github.com/godotengine/godot/issues/66052 This PR adds conversion for the most commonly used theme overrides. This includes:
- Styles (StyleBoxes)
- Font colors
- Spacing, Separation, Offsets
-> Margins, StyleBoxes etc. will still work after the migration.
Can't we just rename the sections instead of listing some specific and arbitrary properties?
Can't we just rename the sections instead of listing some specific and arbitrary properties?
Unfortunately not in all cases.
Sometimes it is as simple as:
custom_styles/normal
-> theme_override_styles/normal
and sometimes more tricky:
custom_colors/font_outline_modulate
-> theme_override_colors/font_outline_color
And using e.g. custom_styles/
in front of the properties will make sure we really just rename the Theme Override
property and not just an arbitrary named variable.
What I mean is, can't we rename custom_*/
to theme_override_*/
, before doing specific renames?
What I mean is, can't we rename
custom_*/
totheme_override_*/
, before doing specific renames?
Ahh. Yeah, that should be possible. Then the theme conversion needs two steps:
- Replace
custom_*/
withtheme_override_*/
- Rename the properties which were renamed in Godot 4
I can check that out tomorrow. :)
What I mean is, can't we rename
custom_*/
totheme_override_*/
, before doing specific renames?
Done. I still opted for the safer approach, so we really won't be converting any unrelated properties/variables.
Thanks!
Cherry-picked for 4.0.1.