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`.
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.
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).
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
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.
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>
- 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