Commit Graph

259 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs 0a38c5802c [Slider] Account for accessibility state when grabbing focus. 2026-05-18 11:12:47 +03:00
Pāvels Nadtočajevs 9482ef1fe3 [Accessibility] Fix positions of nested popups sent to the screen reader. 2026-05-11 08:04:32 +03:00
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
Wagner a82b69a554 Adds translation context to Controls
Co-authored-by: jkirsteins <janis.kirsteins@datadoghq.com>
2026-04-14 23:47:49 -03: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
kobewi 0d220b35a5 Add _get_tooltip_auto_translate_mode_at() to Control 2026-03-22 17:56:46 +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
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
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 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
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
Thaddeus Crews 7dae5da198 Style: Convert *.gen.inc to *.gen.h 2026-02-05 19:47:56 -06:00
David Snopek 308f23f21d Synchronize the names for RequiredParam<T> arguments in header files 2025-12-03 04:14:52 -06:00
David Snopek fc92ce3e7f Use RequiredParam/RequiredResult in some high value places 2025-12-02 10:44:12 -06:00
Silc Lizard (Tokage) Renew bf22eb25e3 Add IKModifier3D 2025-11-04 02:38:48 +09: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
chocola-mint 19c47c5d99 Remove #include "scene/main/timer.h" from control.h 2025-10-05 14:41:06 +09:00
kobewi 618afcffa6 Add pivot_offset_ratio property to Control 2025-09-30 15:27:52 +02:00
Thaddeus Crews 035f5d3055 Merge pull request #110763 from Ivorforce/object-derives-from
Use `AncestralClass` to speed up `Object::cast_to` when possible.
2025-09-22 13:28:45 -05:00
Lukas Tenbrink 96619d46a1 Use AncestralClass to speed up Object::cast_to when possible. 2025-09-22 13:21:51 +02:00
Michael Alexsander aeb3a45c97 Hide Control focus when given via mouse input 2025-09-19 13:43:29 -03:00
Pāvels Nadtočajevs aff5b413aa Move some accessibility properties from Node to Control 2025-06-08 16:25:28 +03:00
Pāvels Nadtočajevs 25ae5c8ab4 Revert "Fix #100536: Control set_position resizes offsets/anchors"
This reverts commit ca57fe1db4.
2025-05-16 14:21:18 +03:00
Pāvels Nadtočajevs 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
Thaddeus Crews 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
kit d16e8b7ca4 Fix and rename mouse filter recursive behavior
and focus mode recursive behavior.
2025-04-09 23:45:03 -04:00
Thaddeus Crews 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
Thaddeus Crews 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
Pāvels Nadtočajevs b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
Filipe Alexandre Francisco Costa 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
DE YU 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
Rémi Verschelde 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
Thaddeus Crews 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
Thaddeus Crews 324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
DE-YU_H14 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
风青山 bef64baa18 Display the actual used theme items in the Inspector
Closes: godotengine/godot-proposals#4439.

Allows viewing the default values ​​of the currently used theme item
in the Inspector.

For theme item properties of resource type, editing the default
resource does not make sense. Use **Make Unique** to create a copy
before editing.
2025-02-07 07:29:30 +08:00
风青山 f7397a0fee Remove confusing Control::is_top_level_control()
It's hard to tell at first glance under what circumstances `is_top_level_control()`
returns `true`. So it's hard to decide when to use this method. And it seems to be
just a helper function for `Control::get_root_parent_control()`.

`is_top_level_control()` seems to only return `true` during entry and exit of canvas.
2025-01-28 00:29:23 +08:00
Rindbee e197463525 Fix getting wrong focus neighbor when the control is in ScrollContainer
Exclude controls inside a `ScrollContainer` that are outside the visible area of ​​
the `ScrollContainer` when looking for focus neighbors.
2025-01-16 07:55:56 +08:00
rune-scape d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
Michael Alexsander 58e79bfa9a Compile certain CanvasItem._edit_*() functions with DEBUG_ENABLED 2024-11-02 15:43:18 -03:00
Haoyu Qiu 009446a277 Add System Locale layout direction for Control and Window 2024-10-17 07:52:07 +08:00