Commit Graph

510 Commits

Author SHA1 Message Date
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 8028b65442 Remove unused includes in scene with clangd-tidy 2026-03-10 16:40:00 +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
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 8c0f175c94 Decouple RenderingServer from as much of the codebase as possible
Notably decouples it from:
- AccessibilityServer
- DisplayServer
- Viewport
- Window
2026-03-03 12:48:07 +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
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
Travis Lange 1cbad83f83 allow toggling line edit via action that isn't keyboard 2026-02-10 10:54:46 -05:00
Lukas Tenbrink c5df0cb82b Don't right-align escaped newlines, e.g. for #define. This has previously led to long diffs in the commit history. 2026-02-04 19:31:28 +01:00
kobewi f7b9703cbd Use actual class names in resource type hints 2026-01-29 21:07:56 +01:00
Nintorch eb019511ed Optimize files that #include input.h header 2026-01-28 14:21:00 +05:00
SuperTemich2005 0e90c6d6d1 Fix LineEdit to reacquire Text Focus when enabled
A fix for LineEdit to reacquire Text Focus
when enabled while UI-focused.

When the player has a UI-focus on a disabled LineEdit node
and that node gets enabled, caret won't appear and arrow keys
will shift UI focus to other Control nodes.

By adding an if-check to call `edit()` in `set_enabled()` function,
LineEdit will capture Text Input Focus when it gets enabled if
the player has set UI focus on it.

Fixes #114846
2026-01-12 12:19:47 -04:00
Adam Scott 263589497b Add non-public {Line,Text}Edit::_set_text()
- [Web] Fix "Enter" not triggering LineEdit submits.

Co-authored-by: Marwen Azouzi <marwen.azouzi@datadoghq.com>
2026-01-01 12:00:52 +01:00
Nolan Darilek 6304e9f876 Accessibility: Fix text field character count and line navigation
Two fixes for text field accessibility:

1. Fix character count being off by one due to trailing newline always
   being appended to the last line. Add `is_last_line` parameter to
   `accessibility_create_sub_text_edit_elements()` to control this.

2. Link adjacent TextRuns via `previous_on_line`/`next_on_line` so
   screen readers can properly navigate lines. Without these links,
   AccessKit treats each TextRun as a separate line, causing incorrect
   announcements when arrowing through multi-line text.
2025-12-03 07:19:05 -05:00
Nông Văn Tình 270407b20a Implement dynamic scaling of the LineEdit right icon based on control size and scale factor
The implementation allows the LineEdit node to scale the right icon to match the font size first. Then, when the `expand_icon` option is enabled, the icon will expand to the full height of the node. The scale of the icon can then be controlled using the scale factor.

Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-11-22 18:32:33 +07:00
Thaddeus Crews 6d32d3df75 Merge pull request #111766 from kitbdev/speed_up_spinbox_creation
Improve performance of SpinBox creation
2025-10-27 10:01:35 -05:00
Thaddeus Crews e870cd911b Merge pull request #110895 from Giganzo/input-focus
Add setting for when to show the focus state for mouse input
2025-10-21 19:09:25 -05:00
Thaddeus Crews ee6fb9e5e1 Merge pull request #111865 from kitbdev/fix-multiple-ime
Fix IME input in multiple Windows at once
2025-10-21 10:27:13 -05:00
kit 8abdedd477 Fix IME input in multiple Windows at once 2025-10-20 20:25:59 -04:00
Thaddeus Crews d7943ae06e Merge pull request #111190 from SantiagoDaza3/Open-Source-Contribution
Fix 'LineEdit' Unicode code-point/control character insertion failing to emit text_changed
2025-10-20 18:09:48 -05:00
Thaddeus Crews 4e03f41779 Merge pull request #111156 from WhalesState/insp-groups
Group `virtual keyboard` and `word separators` properties in the inspector.
2025-10-20 18:09:39 -05:00
Santi 01b9208850 LineEdit: now correctly emits text_changed on Unicode code-point and control character insertion. 2025-10-19 01:02:26 -04:00
kit e232484a37 Improve performance of SpinBox creation 2025-10-17 13:11:21 -04: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
Giganzo e384085ca1 Add setting for when to show the focus state for mouse input 2025-10-07 14:26:14 +02:00
Michael Alexsander 984b52a972 Fix cases where LineEdit can still show focus with mouse events 2025-10-06 10:19:35 -03:00
Mounir Tohami 2421dfaab3 Group virtual keyboard properties in the inspector 2025-10-02 14:15:10 +03:00
Aaron Franke 3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
Thaddeus Crews 1889f68007 Merge pull request #110886 from fstxz/fix-line-edit-double-click
Fix LineEdit's placeholder text being selected when double clicking
2025-09-30 20:10:35 -05:00
Aaron Franke 1a7be001d2 Use const Array ref in set_structured_text_bidi_override_options 2025-09-26 14:31:38 -07:00
Artemy Fedotov 40d56c98bc Fix LineEdit's placeholder text being selected when double clicking 2025-09-25 12:05:48 +04: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
Michael Alexsander aeb3a45c97 Hide Control focus when given via mouse input 2025-09-19 13:43:29 -03:00
Thaddeus Crews ebb51d1f7d Merge pull request #109363 from Giganzo/line_edit_rtl_icon
Fix LineEdit icon positon in right-to-left layout
2025-09-16 09:48:58 -05:00
Pāvels Nadtočajevs 67f80aaa23 [LineEdit] Fix double click not selecting single character words. 2025-08-13 10:42:46 +03:00
Pāvels Nadtočajevs d13b5361b4 [TextServer] Fix caret hit test rounding. 2025-08-08 11:06:07 +03:00
Giganzo fbf27dbfc6 Fix LineEdit icon positon in right-to-left layout 2025-08-06 21:55:37 +02:00
Giganzo e3232b226d Fix LineEdit center alignment 2025-08-05 10:05:45 +02:00
A Thousand Ships f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
Thaddeus Crews a39a83a990 Merge pull request #106526 from roughbits01/line-edit-select-all-web
[Web] Fix `LineEdit` `select_all_on_focus` behavior when using a virtual keyboard
2025-06-27 09:39:58 -05:00
Haoyu Qiu a7ab249a2a Make PROPERTY_HINT_GROUP_ENABLE hide properties by default 2025-06-16 20:03:49 +08:00
Rémi Verschelde c3ce623b54 Merge pull request #107413 from roughbits01/fix-ime-window-position
Fix IME window position not taking into account window transform
2025-06-12 11:56:50 +02:00
LuoZhihao 8ba4656ea3 Compile out editor-only logic within validate_property in games 2025-06-12 12:54:19 +08:00
Marwen Azouzi 76d782d291 Fix IME window position not taking into account window transform 2025-06-11 17:43:21 +02:00
Marwen Azouzi 402a527827 Fix select_all_on_focus behaviour on web export with virtual keyboard 2025-06-10 13:18:59 +02:00
Marwen Azouzi 5cba0b22e9 Fix LineEdit's caret desyncing issue when toggling secret mode 2025-06-05 10:01:11 +02:00
Thaddeus Crews 56b492d154 Merge pull request #107055 from roughbits01/line-edit-drag-selection
Fix LineEdit continues to force showing the caret after drag is aborted
2025-06-04 10:34:34 -05:00