2
0
mirror of https://github.com/godotengine/godot.git synced 2025-04-19 01:27:45 +08:00

204 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs
b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +03:00
Rémi Verschelde
22e41a2b5f
Merge pull request from bruvzg/lbl_min_sz_ex_sp
[Label] Fix min. size calculation counting extra spacing twice.
2025-03-19 12:26:51 +01:00
Thaddeus Crews
b7eda9dbc1
Merge pull request from bruvzg/start_clip
Add properties to configure space trimming on line break.
2025-03-18 14:42:44 -05:00
Thaddeus Crews
ea62170dac
Core: Add constexpr constructors/operators to math structs
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
2025-03-17 12:15:31 -05:00
Pāvels Nadtočajevs
2bbf0f2317
Add properties to configure space trimming on line break. 2025-03-16 16:15:37 +02:00
Pāvels Nadtočajevs
acdaaf48f9 [Label] Fix min. size calculation counting extra spacing twice. 2025-03-07 00:02:42 +02:00
Thaddeus Crews
113fc5a647
Merge pull request from bruvzg/el_force
Expose `OVERRUN_ENFORCE_ELLIPSIS` flag to the controls.
2025-03-05 12:07:55 -06:00
Pāvels Nadtočajevs
7397e33cc9 Fix text shadow outline draw batching. 2025-03-02 19:28:48 +02:00
Pāvels Nadtočajevs
8016c5399f [Label] Fix rounding errors with fractional scale. 2025-02-23 17:59:14 +02:00
Pāvels Nadtočajevs
33eb7724a0 Fix label clipping when ascent/descent are fractional. 2025-02-22 22:51:23 +02:00
Pāvels Nadtočajevs
912b52a6a5 Expose OVERRUN_ENFORCE_ELLIPSIS flag to the controls. 2025-02-10 08:41:31 +02:00
Pāvels Nadtočajevs
d98528ca3c Fix Label vertical line alignment. 2025-01-18 22:07:39 +02:00
bruvzg
cc1db569e1 [TextServer] Improve embedded objects handling performance. 2025-01-07 08:01:29 +02:00
Yufeng Ying
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
Rémi Verschelde
eefd32ba16
Merge pull request from bruvzg/lbl_width
[Label] Fix min. width
2024-12-02 15:52:15 +01:00
Rémi Verschelde
715a7bac00
Merge pull request from bruvzg/lbl_empty_lines
[Label] Fix empty paragraph height.
2024-12-02 15:52:11 +01:00
Pāvels Nadtočajevs
e8f3bebb5d [Label] Fix min. width 2024-12-02 07:57:00 +02:00
rune-scape
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
Pāvels Nadtočajevs
151dcf30ee [Label] Fix empty paragraph height. 2024-12-01 21:53:07 +02:00
bruvzg
b329b4ab06 [Label] Handle text as multiple independent paragraphs. 2024-11-14 11:29:46 +02:00
Adam Johnston
3ac043c508 Add fuzzy string matching to quick open search
Co-authored-by: sam <samsface@gmail.com>
2024-10-28 11:24:36 -07:00
bruvzg
af9e8128f9
[Label] Move shadow drawing into a separate draw step. 2024-03-15 11:24:08 +02:00
Rémi Verschelde
21f0529aa9
Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
2024-02-17 19:03:21 +01:00
RedMser
d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +01:00
Rémi Verschelde
8c48e99c17
Merge pull request from Quimisagi/label-align-values-discarded
Add compatibility rename of `(v)align` properties of `Label`
2024-01-04 16:39:04 +01:00
bruvzg
e9c219cff2
[Label] Add get_character_bounds method to get bounding rectangles of the characters. 2023-12-19 13:53:21 +02:00
bruvzg
56579f397d
[Text Overrun] Add option to set custom ellipsis character, add support for system font fallback. 2023-12-04 08:21:42 +02:00
Yuri Sizov
58a3cfa192 Warn about autowrapped labels in containers 2023-11-09 16:33:46 +01:00
David Crespo
0be873bed2 Add compability rename of (v)align properties of Label 2023-10-31 14:39:57 -05:00
Yuri Sizov
2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
bruvzg
5453503697
[Text Server] Store extra spacing of individual font variations. 2023-08-24 11:58:12 +03:00
Rémi Verschelde
b156e24216
Merge pull request from Rindbee/fix-unnecessary-break-in-Label
Fix unnecessary break when calculating the height of visible lines
2023-08-02 12:15:24 +02:00
bruvzg
16d7e0bf98
[Label] Remove extra line spacing from Label minimum size calculations. 2023-07-26 08:15:53 +03:00
kobewi
de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
bruvzg
b23f259e67
[Label] Add support for tab stops. 2023-06-09 12:59:37 +03:00
Rindbee
e5bebbc9ff Fix unnecessary break when calculating the height of visible lines
This break causes the minsize to be smaller than expected, and then
the size keeps increasing by one line to cover all visible lines.
This can cause performance issues when there are many visible lines.
2023-05-20 23:04:20 +08:00
bruvzg
9163d8c336
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification. 2023-05-15 19:23:54 +03:00
Rémi Verschelde
76d4d09bfa
Revert Label text reshaping fix and subsequent regression fixes
Despite a lot of great work from Pedro to try to improve the Label text
reshaping logic and fix subsequent regressions, we found ourselves still
chasing more edge cases, such as  (which got reverted already due
to it causing yet another regression).

In parallel, it seems like the crash scenario that  was addressing
got solved differently in the master branch, so it appears like this
change is no longer necessary at all (at least not urgently), so we
decided to revert to the previous known "ok" state of Label.

- Revert  "Prevent infinite cascade of re-layout after label text reshaping"
This reverts commit ed8c5cd52f7914daf6f1aa309581ca3b9b048a2e.

- Revert  "Enhance label sizing algorithm"
This reverts commit 5131b81a4db89d2ef05f7cff7b4b5ea93b140aec.

- Revert  "Fix blank non-autowrapping labels"
This reverts commit 3ccabee9ae8f261aa7b0110482fbb5d2500d2e38.

- Revert  "Make label sizing algorithm more robust"
This reverts commit 4f7f1ef60bdbb0c6d6096d3d99f3e967af7d7a39.

- Revert  "Fix width determination of non-trimmed, non-wrapped labels"
This reverts commit 73b6c0b972150c7cee3975080bedc510f1088adb.
2023-02-23 10:36:42 +01:00
Rémi Verschelde
d66f6b3b04
Revert "Fix visible_lines calculation"
This reverts commit ceee405cec171506dde7bc62033dc52ac3797599.

This caused regressions, see  and .

Fixes .
2023-02-22 22:44:55 +01:00
helviett
ceee405cec Fix visible_lines calculation 2023-02-22 14:17:52 +04:00
Pedro J. Estébanez
73b6c0b972 Fix width determination of non-trimmed, non-wrapped labels
In other words, exclude trimmable labels from the special logic used for non-wrapping ones, since they are not expected to dictate their width authoritatively.
2023-02-16 11:54:57 +01:00
Pedro J. Estébanez
4f7f1ef60b Make label sizing algorithm more robust 2023-02-15 18:00:29 +01:00
Pedro J. Estébanez
3ccabee9ae Fix blank non-autowrapping labels 2023-02-13 18:46:56 +01:00
Rémi Verschelde
a90bbc3544
Merge pull request from MinusKube/shaped_text_invalidated_bug
Mark dirty flags when shaped texts are invalidated
2023-02-13 09:13:27 +01:00
Pedro J. Estébanez
5131b81a4d Enhance label sizing algorithm 2023-02-06 14:12:29 +01:00
MinusKube
d59c221404 Mark dirty flags when shaped texts are invalidated 2023-01-28 03:31:55 +01:00
Pedro J. Estébanez
ed8c5cd52f Prevent infinite cascade of re-layout after label text reshaping 2023-01-17 13:49:54 +01:00
Juan Linietsky
0e0a6bb39b
Removed unused property hints and Object::get_translatable_strings()
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes .

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
6f6482e82b Merge pull request from RedMser/label-font-warning
Add warning for missing characters in label font
2022-10-09 18:29:06 +02:00