Commit graph

5468 commits

Author SHA1 Message Date
Rémi Verschelde
a0bbd398ee
Merge pull request #93008 from aaronp64/container_queue_sort
Fix `Container::pending_sort` tracking
2024-06-11 11:53:42 +02:00
Rémi Verschelde
972839d12a
Merge pull request #92968 from bruvzg/rtl_list_indent
[RTL] Fix list item prefix width not taken into account.
2024-06-11 11:22:52 +02:00
aaronp64
5a25637ca9 Fix Container::pending_sort tracking
When Container::queue_sort() is called, pending_sort is set to true to indicate when a call to _sort_children() is queued, to avoid queueing multiple calls. Container::_sort_children() sets pending_sort back to false when finished, but did not do this when the container was not inside the tree.  This would allow cases where queue_sort() could be called just before removing from the tree, causing _sort_children() to never reset pending_sort, preventing any future queue_sort() calls from queueing again.

One case where this happened was with the "Saving Scene" progress bar in the editor - when saving for the first time (or the first time the progress bar popup otherwise appeared in the editor), _sort_children() would be called successfully.  After the progress bar popup was hidden, then shown again on future saves, _sort_children() would not be called again, resulting in the progress bar not taking up as much space as it should.

This issue used to be avoided by setting pending_sort to false immediately on NOTIFICATION_ENTER_TREE - however, this would allow multiple calls to be queued at the same time when entering the tree (#92644).  The multiple calls was fixed recently by removing this assignment, but this also made possible the case where pending_sort is never reset.

This change sets pending_sort back to false in _sort_children() whether or not it's in the tree.  Since this is done in a deferred call, it should still avoid the previous issue of multiple calls being queued at once on entering the tree.

Fixes #92971
2024-06-10 20:17:47 -04:00
bruvzg
721a663aa3
[Button] Adds theme option to align button text and icon to either largest or current stylebox. 2024-06-10 18:40:52 +03:00
bruvzg
fff71db5b1
[RTL] Fix list item prefix width not taken into account. 2024-06-10 13:14:56 +03:00
Anni Ryynänen
b14b222e9d
Fix native file dialogs being shown on set_visible(false) 2024-06-09 17:54:18 +03:00
Rémi Verschelde
a6bb8b00d7
Merge pull request #92664 from KoBeWi/ultimate_final_solution_for_containers
Add visibilty mode to `as_sortable_control()`
2024-06-07 23:29:48 +02:00
Rémi Verschelde
2c01573fdf
Merge pull request #92645 from WhalesState/container-resort
Fix `NOTIFICATION_SORT_CHILDREN` is called twice on startup
2024-06-07 23:29:44 +02:00
Rémi Verschelde
1ee953030e
Merge pull request #92271 from kitbdev/fix-max-line-size
Fix TextEdit HScroll hiding after wrapping
2024-06-07 23:29:28 +02:00
Rémi Verschelde
c2d983553b
Merge pull request #91390 from kitbdev/add-selection-unhide-carets
Unhide carets in add selection for occurrence and fix error
2024-06-07 23:29:23 +02:00
Rémi Verschelde
7c2d65ff66
Merge pull request #92745 from bruvzg/rtl_list_fix
[RTL] Fix nested ordered lists inside unordered lists.
2024-06-04 10:10:34 +02:00
bruvzg
5e616cedd4
[RTL] Fix nested ordered lists inside unordered lists. 2024-06-04 08:08:16 +03:00
bruvzg
d45b896673
Fix IME activation in subviewports. 2024-06-04 00:03:02 +03:00
kobewi
02e1e6d1ec Add visibilty mode to as_sortable_control() 2024-06-03 20:01:31 +02:00
Rémi Verschelde
9b4cfcba5f
Merge pull request #92669 from Hilderin/fix-huge-tscn-icon-in-background-of-file-system-panel
Fix huge .tscn icon and icon in background of File System panel
2024-06-03 10:36:02 +02:00
Hilderin
81395cf9bd Fix Huge .tscn Icon and icon in background of File System panel 2024-06-02 09:11:56 -04:00
Mounir Tohami
62a58c5538 Fix NOTIFICATION_SORT_CHILDREN is called twice on startup 2024-06-01 15:49:43 +00:00
aaronp64
6ecccd6085 Fix RichTextLabel table overlapping with next line
When calculating table height, RichTextLabel::_shape_line would increase the height when it reached the end of a complete row, or the final cell of the table.  RichTextLabel::_resize_line would only increase the height at the end of a complete row, causing the height to ignore the final row if not all cells were populated.  This would cause the final row to overlap with the following line in the RichTextLabel if it was the last visible line in the RichTextLabel, as _resize_line is called when updating scrolling properties.

This change moves the common table size calculations to a separate function to reuse the code between _shape_line and _resize_line, keeping the final cell check that was used in _shape_line.

Fixes #92603
2024-05-31 16:21:17 -04:00
Rémi Verschelde
07e6d0c702
Merge pull request #92138 from YeldhamDev/scrollcontainer_fixes
Fix scrollbar issues in `ScrollContainer`
2024-05-31 14:16:10 +02:00
A Thousand Ships
926afccbd8
[Scene] Add SceneStringNames::panel 2024-05-30 22:54:50 +02:00
A Thousand Ships
755a0efbb6
[Scene] Add SceneStringNames::id_pressed 2024-05-30 22:54:04 +02:00
Rémi Verschelde
505da68b26
Merge pull request #92565 from bruvzg/rtl_clear_flags
[RTL] Clear default justification flags if custom are set.
2024-05-30 22:13:59 +02:00
bruvzg
3a52e0f5fd
[RTL] Clear default justification flags if custom are set and fix typo in the flag name. 2024-05-30 21:23:26 +03:00
kit
af6b96c486 Fix minimap error when moving to the top 2024-05-30 12:06:02 -04:00
Rémi Verschelde
adbc4b086b
Merge pull request #92489 from kleonc/control-invalidate-global-transform-before-notifying-resize
Invalidate `Control` global transform before notifying about resize / rect change
2024-05-30 11:48:09 +02:00
Rémi Verschelde
4cd39c56fb
Merge pull request #92283 from KoBeWi/code_simpleton
Automatically use property count in PropertyListHelper
2024-05-30 11:47:58 +02:00
kleonc
22b6f962d9 Invalidate Control global transform before notifying about resize / rect change 2024-05-30 10:10:24 +02:00
Rémi Verschelde
219af366a5
Merge pull request #92505 from bruvzg/te_ro_margins
[TextEdit] Use style margins for selection in read-only mode.
2024-05-29 11:20:14 +02:00
Rémi Verschelde
05442e81c0
Merge pull request #92500 from timothyqiu/stretch-shrink-range
Add range hint for `SubViewportContainer.stretch_shrink`
2024-05-29 11:20:11 +02:00
Rémi Verschelde
b60471f3c0
Merge pull request #92463 from Daylily-Zeleen/daylily-zeleen/fix_graph_edit_minimap_connection_line
[GraphEdit] Convert to minimap line after getting connection line.
2024-05-29 11:20:04 +02:00
Rémi Verschelde
9bb858c803
Merge pull request #92460 from bruvzg/adlg_cancel_conf
Fix duplicate AcceptDialog cancel/confirm events.
2024-05-29 11:20:01 +02:00
bruvzg
1d0a8ea828
[TextEdit] Use style margins for selection in read-only mode. 2024-05-29 10:07:32 +03:00
Daylily-Zeleen
28a2fa496f [GraphEdit] Convert to minimap line after getting connection line. 2024-05-29 12:58:51 +08:00
Haoyu Qiu
fd5118c781 Add range hint for SubViewportContainer.stretch_shrink 2024-05-29 09:03:15 +08:00
Rémi Verschelde
43cf4740b9
Merge pull request #92461 from bruvzg/rtl_meta_y
[RTL] Use real text/object height instead of line height for meta click/hover detection.
2024-05-28 16:13:26 +02:00
Rémi Verschelde
194b1c478d
Merge pull request #92342 from aaronp64/textedit_duplication
Remove duplicate if/else code in `TextEdit::_notification`
2024-05-28 15:49:19 +02:00
Rémi Verschelde
a10897ddc0
Merge pull request #92301 from robert-wallis/fix-code-edit-delimiter-crash
Fix crash during code editor folding and LSP
2024-05-28 15:49:09 +02:00
Rémi Verschelde
13a32e2753
Merge pull request #92296 from timothyqiu/complete-remove-override
Fix theme StyleBox override parameter completion
2024-05-28 15:49:05 +02:00
Rémi Verschelde
cfe80f9fec
Merge pull request #92222 from semensanyok/fix-TextureButton-click-mask-texture-size-ignored-if-missing-normal-texture
Fix TextureButton's click mask texture size ignored if missing normal texture
2024-05-28 15:48:58 +02:00
bruvzg
061ad36732
[RTL] Use real text/object height instead of line height for meta click/hover detection. 2024-05-28 11:46:56 +03:00
bruvzg
3e691e026b
Fix duplicate AcceptDialog cancel/confirm events. 2024-05-28 10:46:28 +03:00
kit
948f09632e Unhide carets in add selection for occurrence 2024-05-27 15:30:18 -04:00
kit
66a8ee71aa Fix TextEdit HScroll hiding after wrapping 2024-05-27 14:56:55 -04:00
aaronp64
05cc8e7aaf Remove duplicate if/else code in TextEdit::_notification 2024-05-25 10:50:04 -04:00
semensanyok
63554c7765 Fix TextureButton's click mask texture size ignored if missing normal texture 2024-05-25 15:40:09 +02:00
kobewi
b365a63403 Automatically use property count in PropertyListHelper 2024-05-25 10:51:37 +02:00
Robert Wallis
0e97e1bc62 Fix crash during code editor folding and LSP 2024-05-23 20:01:11 -07:00
Haoyu Qiu
8652e9914f Fix theme StyleBox override parameter completion
Also added completion for remove_theme_*_override.
2024-05-24 08:12:53 +08:00
bruvzg
cb3ce85902
Fix PopupMenu focus issues after Viewport::set_embedding_subwindows is changed. 2024-05-22 11:17:43 +03:00
Riley Willows
ea7860c614
Fix CheckBox and CheckButton not using max_icon_width 2024-05-20 10:40:21 +02:00