Commit Graph

409 Commits

Author SHA1 Message Date
Paweł Fertyk 41f4068a6e Fix RichTextLabel crash with out of bound exception
Fixes #68242.

(cherry picked from commit 44592c8c19)
2023-03-13 14:13:36 +01:00
Yuri Sizov 28b7556914 Ensure minimal thickness for RichTextLabel underlines 2023-02-19 13:42:25 +01:00
bruvzg 7246b229e1
Set RTL minimal dash size to 2.0, add invalid dash size error to the `draw_dashed_line`. 2023-02-17 08:53:08 +02:00
RedMser 22dd621cf9 RichTextLabel fixes
- Unexpose ItemType enum, since it is not used in public API.
- Fix documentation for meta tag, since it has no BBCode equivalent.
2023-02-14 17:20:05 +01:00
Danil Alexeev fb107e04d3
Fix `RichTextLabel` context menu not customizable 2023-02-03 12:07:36 +03:00
bruvzg 0cc1f4240a
[RichTextLabel] Fix thread unsafe `set_physics_process_internal` usage. Use `WorkerThreadPool` instead of creating new threads. 2023-01-30 20:47:45 +02:00
Rémi Verschelde af1ef4c94f
Merge pull request #72149 from MinusKube/rich_text_visible_chars_bug
Fix char offset calculation when processing RichTextLabel line caches
2023-01-27 10:30:15 +01:00
MinusKube 03df4e3fce Fix char offset calculation when processing RichTextLabel line caches 2023-01-27 01:54:47 +01:00
Rémi Verschelde 8cebd0a2ce
Merge pull request #71983 from vmedea/push-customfx
Expose RichTextLabel::push_customfx to GDScript
2023-01-25 14:41:01 +01:00
Rémi Verschelde fd66a86d72
Merge pull request #71330 from Geometror/richtextlabel-fit-content
[RichTextLabel] Match minimum size calculation of Label (proper content fitting)
2023-01-25 09:16:38 +01:00
mara be733ea3d1 Expose RichTextLabel::push_customfx to GDScript 2023-01-24 18:16:24 +01:00
bruvzg 5361ec9f43
Implement BiDi override mode for GDScript source. 2023-01-18 19:22:20 +02:00
Hendrik Brucker e59d6b1b8c [RichTextLabel] Match minimum size calculation of Label
(optional via fit_content property)
2023-01-13 15:17:26 +01:00
Rémi Verschelde 312703ca1f
Merge pull request #70566 from cg9999/richtextlabel_fix
Fix crash in RichTextLabel table parsing
2023-01-12 14:52:02 +01:00
Henri Valta 81d0f42800 Fix crash in RichTextLabel table parsing
Fixed with help of feedback from bruvzg. Prevents invalid items getting to stack.
2023-01-12 12:27:25 +02: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
Yuri Sizov ecc5c275f4
Merge pull request #70407 from Koyper/rich_text_bold_italics
[RTL] Fix push bold or italics not using bold_italics_font when required
2022-12-23 00:10:53 +03:00
Koyper 81343ae210 Fixed RichTextLabel push bold/italic to correctly use bold_italic font. 2022-12-22 13:30:52 -06:00
Koyper e846b22da6 Renamed RTL remove_line() to remove_paragraph(). 2022-12-21 11:54:18 -06:00
bruvzg 53c76fa5d1
[RTL/TextServer] Add baseline inline alignment mode for objects and RTL tables. 2022-12-15 23:16:02 +02:00
bruvzg ca5a3d0c68
[RTL] Fix nested tables getting parent offset applied multiple times. 2022-12-15 14:05:21 +02:00
bruvzg dd7b095f7f
[RTL] Fix image click detection. 2022-12-14 21:27:00 +02:00
Lluc Pares 2005b5c44a RichTextLabel: decouple meta cursor from underline
This commit decouples the type of cursor used when the underline
of meta tag is set to False. Previous to this commit setting the
meta underline to false in the RichTextLabel would also make it
show the arrow cursor instead of the hand cursor.

Making the meta tag with no underline should not have any effect
on the type of cursor, since the text will still be clickable it
should be expected to have a hand cursor.

The same behavior is seen in other languages, like HTML+CSS, where
the setting "text-decoration" to "none" for the links, disables
the underline but maintains the clickable cursor.

Fixes godotengine/godot-proposals#3193
2022-12-08 09:43:41 +01:00
bruvzg 889bcff24f
[RTL] Fix search method not taking nested frame and line wraps into account. 2022-12-04 22:11:21 +02:00
bruvzg 0541c746ee
[RichTextEffect] Restore missing `relative_index` property. 2022-12-02 09:50:54 +02:00
Iceflower 908f392af6
Rename theme cache separation names 2022-11-30 16:06:14 +01:00
Rémi Verschelde 5d20dccade
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources 2022-11-24 14:06:00 +01:00
Hana 125d7deaff add possibility to use only one color 2022-11-23 21:47:22 +01:00
bruvzg 9b14b5b483
Fix multithreaded RTL resetting scroll position on resize. 2022-11-17 16:26:06 +02:00
bruvzg 3add6dcd89
Add `Control::localize_numeral_system` property to toggle automatic numeral system conversion. 2022-11-17 14:59:56 +02:00
Markus Sauermann 3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
Rémi Verschelde b6cbea5e58
Merge pull request #63590 from golfinq/fbg-padding
Add padding options in theme for fg/bgcolor tags in RichTextLabel
2022-10-31 11:14:55 +01:00
kobewi c7eb814ede Remove override_selected_font_color property 2022-10-26 12:59:18 +02:00
Rémi Verschelde 2ffb609658 Merge pull request #66337 from EricEzaM/sprite-frames
Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
2022-10-13 15:24:39 +02:00
Petra Baranski 546e017613 Add Spritesheet support to RichTextLabel BBCode
BBCode: [img region=0,0,16,16]res://icon.svg[/img]
2022-10-11 13:04:15 +02:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde 7ab01450cf Fix MSVC warning C4702: unreachable code
Part of #66537.
2022-09-28 16:46:48 +02:00
bruvzg 970592274d
[RTL] Fix font variations / OpenType features of theme default font not updated when default font is changed. 2022-09-26 13:04:40 +03:00
Eric M 2eda77c682 Ensure all checks of `is_action` in the editor which are for 'shortcut' use, check the action exactly. 2022-09-24 18:01:02 +10:00
Rémi Verschelde 1928492b41 Merge pull request #65158 from nongvantinh/fixed-infinite-loop
Fixes engine runs into an infinite loop when searching using FindBar
2022-09-23 09:45:34 +02:00
bruvzg 46af7cbfdd
[RTL] Add option to apply built-in effects to the individual connected glyphs. 2022-09-19 18:10:32 +03:00
bruvzg 2a0b4244b7
Fix RichTextLabel not updating on theme/theme override change until text is updated. 2022-09-16 22:24:11 +03:00
bruvzg 2aa226f5e1
RTL Improvements
Do not apply negative line separation to the last line.
Ensure all methods immediately update cache in a single thread mode.
Fix bbcode_enabled change not being applied until text is changed.
Fix crash if line height is zero or less.
2022-09-13 11:40:20 +03:00
bruvzg ac1f2b378f
[RTL] Stop threaded RTL auto-redrawing as soon as text processing is finished, instead of waiting for first redraw. 2022-09-07 22:24:30 +02:00
Yuri Sizov 39ef611a7d Fix theming code in Panel, SplitContainer, RichTextLabel 2022-09-06 22:53:19 +03:00
Yuri Sizov 43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
Micky b6daad8d4b Rename `range_lerp` to `remap` 2022-09-06 07:19:20 +02:00
Yuri Sizov fc7cef8dec Fix theme propagation in various parts of the editor 2022-09-02 13:18:31 +03:00
Micky 511134f55f Fix Label & RichTextLabel's visible_ratio not working 2022-09-01 19:22:12 +02:00
bruvzg 7aad14a4b6
[TextServer] Add support for trimming edge spaces on line break. 2022-09-01 08:11:55 +03:00