Commit Graph

371 Commits

Author SHA1 Message Date
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
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
Nong Van Tinh 97c0b0c74a Fixes #64962 that cause program run into infinite loop 2022-09-01 01:26:08 +07:00
Micky e31bb5ffeb Rename `CanvasItem.update()` to `queue_redraw()`
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
VolTer 832950d1f2 Reorganized Label and RichTextLabel properties 2022-08-28 10:26:04 +02:00
Micky 64bd36ecee Rename Label & RichTextLabel.`percent_visible` to `visible_ratio`
Also updates the documentation of both `visible_characters` and `visible_ratio` to, better describe what they do and improve consistency between the two Classes.
2022-08-26 12:15:57 +02:00
Yuri Sizov 5d14d08702
Merge pull request #59226 from Rindbee/better-setters-in-gui-controls
Improve the setters in gui, return directly if the value does not change.
2022-08-24 17:03:54 +03:00
Rémi Verschelde 854eb58074
Merge pull request #64783 from bruvzg/fix_rtl_min_size
Fix RTL min. size not triggering text cache update.
2022-08-24 09:49:00 +02:00
风青山 e561c68256 Add some codes, returnes directly if the value is not changed.
Avoid executing the following value-changed logics if the value does not really change.
2022-08-23 23:25:22 +08:00
bruvzg f02d45ce0c
Fix RTL min. size not triggering text cache update. 2022-08-23 16:27:45 +03:00
bruvzg 80a47ab0f9
[RTL] Improve meta click position. 2022-08-23 09:57:22 +03:00
Micky 9a63792a08 Clamp Label's `percent_visible` properly between 0 and 1.0
Also applies to RichTextLabel
2022-08-22 12:03:03 +02:00
iwek efcdfc2332 Fix issue with overlaping text label text 2022-08-04 19:19:33 +02:00
bruvzg 94e5ad2019
[RichTextLabel] Fix theme bold / italics / bold italics and mono font size not applied correctly. 2022-07-26 10:45:40 +03:00
RedMser d3a1e82025 Add error for invalid RichTextLabel.install_effect 2022-07-24 23:15:27 +02:00
bruvzg cbe3a2dcb7
Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API. 2022-07-15 08:49:50 +03:00
Rémi Verschelde c17af2c5a3
Merge pull request #62774 from Rindbee/make-the-meta-click-area-fit
Make the meta click area fit to its visible area
2022-07-13 14:14:34 +02:00
Rindbee 74f99f7fa3 Make the meta click area fit
Eliminate the click vacuum area, mainly the indentation generated by indent/ul/ol tags
2022-07-13 07:12:22 +08:00
bruvzg a319e6e623
Fix regressions from Font refactor
Fixes `p_font.is_null()` errors due to incorrect resource type used.
Fixes code editor font not set correctly, and OpenType features applied to the wrong font.
2022-07-07 15:11:08 +03:00
bruvzg 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
bruvzg b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
bruvzg ba6cb84d01
[RTL] Fix underline/overline/strikethrough interaction with the "visible characters" property. 2022-06-13 10:53:55 +03:00
FireForge 4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
bruvzg fc77f983cb
[RTL] Stop processing thread before deleting scroll bar. 2022-06-06 23:46:22 +03:00
Rémi Verschelde 52952edafc
Merge pull request #61724 from iwek7/fixing_rich_text_label
Fix richTextLabel scroll showing
2022-06-06 10:39:39 +02:00
iwek c179ba665a Fix richTextLabel scroll showing 2022-06-05 20:33:17 +02:00
Rindbee a14f7c4027 Fix strange behavior with list close tags and empty list tags
Fix the first two points in #61621.

Support for two  writing ways: compact or loose. The loose one is designed for easy editing in the editor.
For this, the first blank line (if exists) right after the list tags (`[ol]`, `[/ol]`, `[ul]`, and `[/ul]`)
will be ignored.

Make sure the empty list contains at least one item, that is, an empty list is ultimately a list with one item.
As a reminder here is a list.
2022-06-05 01:33:09 +08:00
Rémi Verschelde 136da4d3bc
Merge pull request #61182 from danielkariv/fix_misclick_selection 2022-05-20 15:38:22 +02:00
Daniel Kariv e6c909b489 add check for selection when try to push a meta.
Add a check for when we select a text but end on a link. Before it would act as if we just click an link, but now it changes it so if we click-drag over a link, we could select it (and not move to other page).
2022-05-19 11:55:14 +03:00
bruvzg cfcdfc38e2
[RTL] Add support for shaping in background thread. 2022-05-19 09:34:44 +03:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Rémi Verschelde 02bb8e948f
Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00
FireForge 3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
bruvzg be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
ConteZero 6530e55f2d Fix select_all() crash in RichTextLabel 2022-04-13 15:41:34 +02:00
ConteZero 645aded7e9 Add context menu to RichTextLabel 2022-04-12 16:28:38 +02:00
ConteZero addadaaa24 Add select_all() to RichTextLabel 2022-04-10 18:03:10 +02:00
bruvzg f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
bruvzg 9c61fa7ad8
[RTL] Improve table cell selection. 2022-04-06 09:03:08 +03:00