Issue conclusion: GraphNode port connections appear misaligned when switching between vertex and fragment modes, only realigning after zoom or layout refresh.
Investigation: The root cause was due to port positions being calculated before child layouts had finalized, resulting in inaccurate Y positions for ports. The original implementation relied on Control::position.y, which was not yet updated during the initial layout pass.
Explaination: This fix computes vertical offset using titlebar and stylebox sizes instead, ensuring port alignment is correct immediately after layout, without relying on zoom-triggered re-layouts.
Resolves: #105232
Add layout mode check to distinguish GraphEditor and ShaderGraphEditor
Fix port position calculation by distinguishing between GraphEditor and ShaderGraphEditor layouts.
Due to differences in layout flow and update timing (CPU vs GPU), ShaderGraphEditor requires manual vertical offset calculation, while standard GraphEditor can directly get the actual child positions after layout in run time.
This change adds a layout mode check (`is_using_resort_layout) to determine the appropriate method for computing port positions.
Fixed nits using cached values and removed redundant condition variable definition.
Add comment for the condition checking.
- Changed slot_y_cache calculations in _resort function so ports will be drawn correctly for expanded children.
- Similarly calculate the port_cache.pos in _port_pos_update function so the connection matches the port's position.
This adds binds for GraphEdit/GraphElement/GraphNode, which were
skipped before due to a rework. This also adds binds for Window,
which was skipped before due to a complicated code organization.
Also adds theme cache entries/direct cache access to a few places
that previously missed it. Some theme properties are now exposed
to other classes via friendships or public getters for convenience.
This removes all string-based theme access from scene/ classes.
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".
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.
Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.
Just a few comments have also been changed to say "redraw".
In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
It's not about overriding or accessing `_validate_property`,
but since `_validate_property` became a multilevel method,
the GDCLASS macro now tries to access the one from the parent class,
which causes a compiling error if the parent class declares
`_validate_property` as private.