Commit Graph

605 Commits

Author SHA1 Message Date
1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
45d064c388 Merge pull request #109590 from bruvzg/focus_checks
`find_*_valid_focus`: Check all tested neighbors to prevent loops.
2025-09-30 18:35:00 -05:00
be421bcdd4 Merge pull request #110250 from YeldhamDev/i_just_cant_keep_focused
Hide `Control` focus when given via mouse input
2025-09-22 13:28:44 -05:00
149a4b4ca1 Merge pull request #107868 from lawnjelly/quick_ancestry4
Provide quick access to `Object` ancestry
2025-09-20 13:41:39 -05:00
aeb3a45c97 Hide Control focus when given via mouse input 2025-09-19 13:43:29 -03:00
f27f917d32 Merge pull request #107955 from lodetrick/mouse-signals
Fix `mouse_entered` and `mouse_exited` Signals being emitted too early
2025-09-19 09:17:04 -05:00
f260c5db8a find_*_valid_focus: Check all tested neighbors to prevent loops. 2025-08-13 23:59:01 +03:00
bf5fada0b1 Revert "Fix incorrect anchor preset when custom offset is set" 2025-08-07 12:55:59 +07:00
281ce842fd Merge pull request #108442 from limuy2022/master
Fix incorrect anchor preset when custom offset is set
2025-07-15 08:04:26 -05:00
21b1530cd4 Fix incorrect anchor preset when custom offset is set 2025-07-10 19:19:05 +08:00
e748514112 Merge pull request #105835 from bruvzg/edited_scene_direction
Improve edited scene layout direction detection.
2025-07-09 11:33:11 -05:00
f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
c03a7b7893 Delay Mouse signals until after internal processing 2025-06-24 14:29:17 -07:00
14a814586a Provide quick access to Object ancestry 2025-06-23 07:11:11 +01:00
ae484828bb Merge pull request #107408 from Ivorforce/node-path-string-explicit
Make conversions from `NodePath` to `String` explicit.
2025-06-12 22:49:03 +02:00
8ba4656ea3 Compile out editor-only logic within validate_property in games 2025-06-12 12:54:19 +08:00
e2931a5c19 Make conversions from NodePath to String explicit. 2025-06-11 16:50:27 +02:00
aff5b413aa Move some accessibility properties from Node to Control 2025-06-08 16:25:28 +03:00
25ae5c8ab4 Revert "Fix #100536: Control set_position resizes offsets/anchors"
This reverts commit ca57fe1db4.
2025-05-16 14:21:18 +03:00
4976b38dec Revert "Fix unexpected control position change when left/top offsets not match pos_cache"
This reverts commit 49c7966042.
2025-05-16 14:19:51 +03:00
b22eba1285 Show theme_type_variations in the inspector on Controls that inherit a theme
`theme_type_variation`s are now shown in the children and children of children
that inherit a theme from a parent `Control` node.
2025-05-13 00:56:06 +02:00
49c7966042 Fix unexpected control position change when left/top offsets not match pos_cache 2025-05-07 18:46:40 +08:00
kit
e6cb7affdc Allow Control Rect tool to not snap to pixel 2025-05-01 19:47:17 -04:00
f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
3578aa6acc Fix item translation and icon in the Anchors Preset dropdown
- Some items were not translated.
- Item icons did not react to light/dark theme switch.
2025-04-28 19:50:24 +08:00
03048aa94a Improve edited scene layout direction detection. 2025-04-28 07:57:26 +03:00
1b4ed4c038 Merge pull request #105595 from bruvzg/focus_fx
Fix `FOCUS_ACCESSIBILITY` grabbing focus when it is not supposed to, forward `GraphNode` key input to `GraphEdit`.
2025-04-27 19:21:34 -05:00
1a2a1b07df Merge pull request #105799 from Repiteo/scons/enum-conversion-warnings
SCons: Add enum conversion warning
2025-04-27 19:21:23 -05:00
3947cbe3b2 Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
db0c0a9182 Fix FOCUS_ACCESSIBILITY grabbing focus when it is not supposed to, forward GraphNode key input to GraphEdit. 2025-04-27 00:45:11 +03:00
dc9c34f0c6 SCons: Add enum conversion warning 2025-04-26 12:06:20 -05:00
cf8455c52d Fix regression causing jittery canvas transforms
This PR https://github.com/godotengine/godot/pull/104451 introduced
a tricky regression. Canvas item transforms could risk not being
updated for multiple frames due to the conditional on the line
in this commit. Before the "approx_pos|size_changed" fix, the
transform would get updated incidentally either way. But now there's
a gap where (pos_changed && !size_changed) may not be true for a few
frames and there's nothing else left to trigger a transform update.

The fix is quite simple, for updating the canvas item transform
we remain trigger happy around position changes, but respect the
approx_size_changed.
2025-04-16 23:59:05 -07:00
ad40939b6f Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
00bd421089 Merge pull request #105222 from kitbdev/fix-mouse-filter-recursive-and-rename
Fix and rename mouse filter recursive behavior and focus mode recursive behavior
2025-04-16 10:45:12 -05:00
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
kit
d16e8b7ca4 Fix and rename mouse filter recursive behavior
and focus mode recursive behavior.
2025-04-09 23:45:03 -04:00
c6394a1b8b Merge pull request #104357 from FilipeAlexCosta/control-set-position
Fix `Control.set_position` resizes offsets/anchors
2025-04-09 18:11:55 -05:00
36a135ca62 Merge pull request #104451 from WinnerWind/fix_resized_logic_for_control
Fix excessively calling resized and floating point errors in Control.
2025-04-09 18:11:35 -05:00
c7fc877895 Merge pull request #101745 from Rindbee/remove-is_top_level_control
Remove confusing `Control::is_top_level_control()`
2025-04-09 08:51:46 -05:00
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
b7c452a36d Merge pull request #104614 from kleonc/control_layout_mode_fallback_to_valid_value
Fallback `Control.layout_mode` to valid mode when child of non-container control
2025-04-07 08:43:22 -05:00
ca57fe1db4 Fix #100536: Control set_position resizes offsets/anchors
The set_position method computes the anchors/offsets to match a
rectangle at the given position with size "size_cache". However, when
the Control's combined minimum size is larger than the size obtained
through the offsets and anchors, "size_cache" is set to be as large as
the combined minimum size. Therefore, when position is set while the
combined minimum size is larger than the rectangle given by the anchors
and offsets, it would resize these two fields, which would then stop
the Control from shrinking when its combined minimum size decreased. To
fix this, set_position now uses the size given by the offsets and
anchors instead of the "size_cache" field. This way, the rectangle
denoted by the offsets and anchors is simply moved, without being
resized, enabling the Control to shrink automatically when its combined
minimum size decreases. I also added a test case to ensure that the
Control shrinks correctly after setting its position while it has a
larger custom minimum size than the one obtained through the offsets
and anchors.
2025-03-31 08:50:00 +01:00
ba3482926d Merge pull request #104444 from Delsin-Yu/fix-disabled-recursive-behavior-not-applied-on-ready
[GUI] Fix reparenting control does not update recursive mode cache properly
2025-03-29 10:16:35 -05:00
04608fae4a [GUI] Fix an issue where setting a control's recursive mode to disabled does not work on ready. 2025-03-29 06:34:11 +08:00
75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
065d567116 Fallback Control.layout_mode to valid mode when child of non-container control 2025-03-25 17:08:44 +01:00
d4bdb1a2b2 Use approximate values for resized.
This introduces two new booleans approx_pos_changed and approx_size_changed which are the pos_changed and size_changed booleans that are immune to floating point errors.

This aims to fix two bugs in one shot. #93832 and #48935
2025-03-21 22:01:54 +05:30
7ad0b9b16c Merge pull request #97495 from Delsin-Yu/control_recursive_disable_children
[GUI] Implement properties that can recursively disable child controls' `Focus Mode` & `Mouse Filter`
2025-03-19 12:26:03 +01:00
3bc2821e26 Merge pull request #102372 from Rindbee/display-the-actual-used-theme-items-in-the-Inspector
Display the actual used theme items in the Inspector
2025-03-11 16:53:55 -05:00
a49ca33a7f Implement properties that recursively disables children's focus & mouse filter.
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-03-07 22:34:58 +08:00