Commit Graph

651 Commits

Author SHA1 Message Date
StarryWorm 05737cd449 Add "desired size" to Control
A `Control` can define `get_desired_size()` which allows it to grow based on its content without increasing its minimum size.
This new size will be respected by parent `Container`s.
Currently used by `Label` and `TabBar`.
2026-05-07 13:01:02 -04:00
Thaddeus Crews 4836ba26f0 Merge pull request #115340 from wagnerfs/add-translation-context
Add translation context to Controls
2026-04-15 14:02:36 -05:00
Wagner a82b69a554 Adds translation context to Controls
Co-authored-by: jkirsteins <janis.kirsteins@datadoghq.com>
2026-04-14 23:47:49 -03:00
Enzo Novoselic 6784e1e9fa Fix crash due to missing guards 2026-04-14 19:37:42 -04:00
Thaddeus Crews 0880a908d7 Merge pull request #118536 from StarryWorm/fix-label-crash
Defer minimum size updates in maximum size handling
2026-04-14 07:11:02 -05:00
StarryWorm ed9efe8287 Defer minimum size updates in maximum size handling 2026-04-13 15:26:15 -04:00
StarryWorm eea9606719 Reorganize Control inspector layout 2026-04-09 11:16:16 -04:00
StarryWorm bdca8b66e7 Add custom_maximum_size to Control
This property mirrors `custom_minimum_size` and enables the user to set a size the `Control`. Enabling `propagate_maximum_size` forces all children to respect this node's maximum_size.
Not all `Control` types handle this gracefully, which may result in content clipping.
2026-04-07 14:34:12 -04:00
Thaddeus Crews 3eb96c8313 Merge pull request #117244 from bruvzg/ii
Do not show accessibility configuration warnings for non-focusable controls, account for name fallback.
2026-03-30 13:35:35 -05:00
Rémi Verschelde 707b19f397 Revert "Expose Control.call_gui_input"
This reverts commit 35eabf06b9.

This was merged by mistake, there's no consensus yet on the implementation.
2026-03-26 17:08:42 +01:00
Lyuma 35eabf06b9 Expose Control.call_gui_input
This allows simulated events to be sent directly to individual controls.
2026-03-24 01:48:39 -07:00
Rémi Verschelde 970f8236b5 Merge pull request #117733 from KoBeWi/autranslator_localized_(i.e._at_location)
Add `_get_tooltip_auto_translate_mode_at()` to Control
2026-03-23 22:36:15 +01:00
kit 94c2707a8b Fix WindowWrapper leaking all key inputs to parent 2026-03-23 16:58:42 -04:00
kobewi 0d220b35a5 Add _get_tooltip_auto_translate_mode_at() to Control 2026-03-22 17:56:46 +01:00
Rémi Verschelde 1eb0374e5f Merge pull request #117488 from YeldhamDev/layout_custom_anchor_fix
Fix "Custom" anchor preset being ignored if the parent isn't a `Control`
2026-03-16 23:41:27 +01:00
Rémi Verschelde 1a69be88e2 Merge pull request #111819 from MewPurPur/democratize-cursor-shape
Add virtual `_get_cursor_shape()` method in Control
2026-03-16 23:41:08 +01:00
Michael Alexsander 697c4f1d0c Fix "Custom" anchor preset being ignored if the parent isn't a Control 2026-03-16 17:56:33 -03:00
MewPurPur 64fcc13fc5 Add virtual _get_cursor_shape() method in Control 2026-03-16 22:12:39 +02:00
Pāvels Nadtočajevs cdb35db426 Do not show accessibility configuration warnings for non-focusable controls, account for name fallback. 2026-03-13 08:53:09 +02:00
Rémi Verschelde 2759cbdc6c Merge pull request #87081 from timoschwarzer/feature/control-render-transform
Add transform offset to Control nodes
2026-03-06 15:16:43 +01:00
Timo Schwarzer c3d96f262f Add offset transform to Control nodes 2026-03-05 22:55:49 +01:00
Rémi Verschelde 2dd1f4ef60 Decouple node.h from scene_tree.h, minimize its other includes 2026-03-05 13:54:46 +01:00
Thaddeus Crews db25be3646 Merge pull request #116585 from jinyangcruise/fix_symbol_jump
Fix symbol jump history navigation issue.
2026-03-04 11:20:33 -06:00
Rémi Verschelde eabb9a63d4 Rename callable_method_pointer.h to callable_mp.h and include it explicitly
This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.

Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.
2026-03-04 16:23:23 +01:00
Rémi Verschelde 765362b033 Explicitly include core/config/engine.h where used 2026-03-04 10:17:10 +01:00
Rémi Verschelde a447ac95ec Move DisplayServer enums and typedefs to DisplayServerEnums
This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
2026-03-03 12:44:02 +01:00
Pāvels Nadtočajevs 1306221592 Move accessibility methods/enums from DisplayServer to the AccessibilityServer dedicated singleton. 2026-03-02 13:48:29 +02:00
jinyangcruise e4e31abeaa fix symbol jump history navigation issue. 2026-02-28 09:45:06 +08:00
Thaddeus Crews e380a41752 Style: Add class_db.h includes explicitly 2026-02-26 15:50:28 -06:00
Rémi Verschelde f5a290ac46 Move RenderingServer enums to a dedicated RenderingServerEnums (RSE) namespace
A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.

With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.

On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
2026-02-25 19:43:03 +01:00
kobewi 6f86914f55 Cleanup _validate_property() implementations 2026-02-23 15:05:25 +01:00
kit 739869359a Fix Control minimum size check too agressive 2026-02-15 21:22:07 -05:00
kleonc 4e8d5062e6 Fix drag-resizing Control with non-zero pivot_offset_ratio 2026-02-08 20:18:39 +01:00
Michael Alexsander cdcab44e9b Fix wrong size on Container nodes due to late cache update
Co-authored-by: kit <kitbdev@gmail.com>
2026-02-03 10:55:02 -03:00
kobewi f7b9703cbd Use actual class names in resource type hints 2026-01-29 21:07:56 +01:00
Michael Alexsander d061d9bac3 Stop exposing external theme item properties 2026-01-26 11:49:03 -03:00
Nolan Darilek 7f13b04c99 a11y: Only support blur and focus actions on widgets that are actually focusable 2025-12-30 09:20:45 -05:00
David Snopek fc92ce3e7f Use RequiredParam/RequiredResult in some high value places 2025-12-02 10:44:12 -06:00
Pāvels Nadtočajevs 8e626d5103 Fix grab_focus incorrectly handling FOCUS_ACCESSIBILITY. 2025-10-31 18:52:18 +02:00
kleonc afec8a1892 Fix Control.pivot_offset missing PROPERTY_USAGE_STORAGE flag 2025-10-22 15:21:43 +02:00
Thaddeus Crews 9e96c7d9b8 Merge pull request #110378 from timothyqiu/rtl-preview
Make text-related nodes translation domain aware
2025-10-16 12:48:05 -05:00
Thaddeus Crews e560ea47d4 Merge pull request #70646 from KoBeWi/relatable_offset
Add `pivot_offset_ratio` property to Control
2025-10-13 12:30:10 -05:00
Thaddeus Crews d1d28c0bcf Merge pull request #111223 from Ivorforce/remove-iterator-include
Replace `std::size` usage with `std_size` to avoid `<iterator>` include.
2025-10-06 09:06:49 -05:00
Lukas Tenbrink 1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
Aaron Franke 3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
Thaddeus Crews 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
kobewi 618afcffa6 Add pivot_offset_ratio property to Control 2025-09-30 15:27:52 +02:00
Thaddeus Crews 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
Haoyu Qiu 172c80df67 Make text-related nodes translation domain aware
- Makes `is_layout_rtl()` translation domain aware
- Makes various text-drawing controls translation domain aware
- Makes translation preview use the project's fallback locale when disabled
2025-09-22 09:39:14 +08:00
Thaddeus Crews 149a4b4ca1 Merge pull request #107868 from lawnjelly/quick_ancestry4
Provide quick access to `Object` ancestry
2025-09-20 13:41:39 -05:00