Commit Graph

14 Commits

Author SHA1 Message Date
Thaddeus Crews
b37fc1014a
Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00
kobewi
065dd099dd Remove empty bind_methods() 2024-08-15 08:24:32 +02:00
bruvzg
847aadee02
[Editor] Update font preview directly instead of invalidating property list. 2024-07-05 12:48:39 +03:00
Aaron Franke
1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
Michael Alexsander
9f56287d96
Remove pointless _notification() function in EditorPropertyOTVariation 2024-03-23 17:10:57 -03:00
Muller-Castro
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
Raul Santos
c7f4ca36a4
Use PropertyUsageFlags enum in parse_property 2023-01-31 23:31:15 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Yuri Sizov
980f5f32f4 Make property_*_revert methods multilevel and expose them for scripting 2022-08-18 00:03:53 +03:00
bruvzg
36ef8f29dc
Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00