This change introduces a new theme configuration struct to be
passed to the aforementioned routines to better control reuse
of styles and definitions in the generator.
Everything not passed and not explicitly shared is scoped so it
is not automatically accessible throughout the routine. This
should ensure that the decision to share styles is a conscious one.
In the future we will try to reduce the number of unique definitions
and share most of it. This PR is a stepping stone on this path.
This also puts the effort into separating redefinitions of
default theme items vs custom types introduced only by the editor.
In a few cases where editor-specific definitions need to reference
default definitions we simply fetch them from the theme. It's not
ideal and hides the dependency a bit, but hopefully these cases
will be abstracted properly in due time.
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.
Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.
All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
* Scene tab
* Animation name list in Animation panel
* Feature profile name list in Editor Feature Profile dialog
* Layout names in editor layout menu
* Subresource list in Inspector dock
* Resource type shown in EditorResourcePicker
* Enum dropdowns in inspectors: We'll eventually allow auto translating
these after implementing a way to opt-out auto translation on a
property-by-property basis and a way to extract enumerators.
- Make all margin properties follow the same naming convention (their getter and setter too).
- Remove a virtual counterpart of `get_style_margin` from API.
- Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
Not sure why I didn't get those before, it may be due to upstream
changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply
rebuilding Godot from scratch with different options.
`set_tooltip` -> `set_tooltip_text`
`get_tooltip` -> `get_tooltip_text`
For consistency:
`get_button_tooltip` -> `get_button_tooltip_text`
And the `tooltip` parameter in `add_button` was renamed to `tooltip_text`
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
This reverts commit a988fad9a0.
As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.