Commit Graph

5301 Commits

Author SHA1 Message Date
Rémi Verschelde c1fed53943
Merge pull request #80271 from Ymanawat/optionmenu-scroll-test
Fix scrolling on keyboard/controller input
2023-10-09 15:30:57 +02:00
Rémi Verschelde c6635b4640
Merge pull request #71519 from adamscott/fix-code-completion-home-end
Fix code completion override of home and end keys
2023-10-09 15:30:27 +02:00
A Thousand Ships f18aa00e85 Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-10-08 17:23:33 +02:00
jsjtxietian 61be3eafc0 Fix spinBox will reset text when redrawing 2023-10-08 20:03:08 +08:00
bruvzg 49595ca225
[RTL] Remove unnecessary glyph position rounding. 2023-10-08 12:38:06 +03:00
Adam Scott 25cbb682f5
Fix code completion override of home and end keys 2023-10-06 14:48:45 -04:00
kobewi 1fee40a189 Accept cancel event when unfocusing LineEdit 2023-10-06 16:00:56 +02:00
Rémi Verschelde 3075e4ef1d
Merge pull request #82811 from MewPurPur/more-line-edit-organization
Place LineEdit secret in its own section
2023-10-06 12:52:58 +02:00
bruvzg f93e254b58
[PopupMenu] Handle shortcuts with "global" flag directly. 2023-10-06 11:16:41 +03:00
kobewi 09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
Rémi Verschelde aa554e8278
Merge pull request #82694 from BrianMacIntosh/master
"Whole Words" search can detect word boundaries inside the search term.
2023-10-05 10:08:58 +02:00
MewPurPur dc2e0aab6f Place LineEdit secret in its own section 2023-10-04 22:41:45 +03:00
Rémi Verschelde e8e79c9195
Merge pull request #82776 from MewPurPur/more-text-edit-organization
Organize TextEdit's inspector
2023-10-04 15:46:05 +02:00
Rémi Verschelde 4321806e46
Merge pull request #82743 from bruvzg/fd_no_editor
[File Dialog] Do not open native file dialogs in the edited scene.
2023-10-04 15:44:29 +02:00
Rémi Verschelde d5db0e5032
Merge pull request #81218 from bruvzg/_temp_fs
[Native File Dialogs] Improve filter list handling, add selected filter to the callback.
2023-10-04 15:34:16 +02:00
MewPurPur 38210dbe27 Organize TextEdit's inspector 2023-10-04 13:24:29 +03:00
bruvzg d1aaa914f3
[macOS] Add `about_to_open` and `popup_hide` callback for the global menus, move part of logic to the PopupMenu to allow live menu modification. 2023-10-04 09:49:51 +03:00
bruvzg 2d9ba45e76
[File Dialog] Do not open native file dialogs in the edited scene. 2023-10-03 23:02:12 +03:00
bruvzg 43e4708dff
[Native File Dialogs] Improve filter list handling, add selected filter to the callback. 2023-10-03 19:26:16 +03:00
Rémi Verschelde b11309ddb6
Merge pull request #81633 from matorin57/code-completion-popup
Avoid resetting the code completion popup excessively
2023-10-03 17:20:49 +02:00
Rémi Verschelde 530e01b478
Merge pull request #80409 from bruvzg/est_title_size
[DisplayServer] Add method to estimate window title bar size.
2023-10-03 17:12:18 +02:00
Rémi Verschelde 9e8a93a5a9
Merge pull request #78762 from Sauermann/fix-svc-event-filter
Enable `InputEvent`-filtering in `SubViewportContainer`
2023-10-03 17:10:34 +02:00
bruvzg 72e2e47059
[DisplayServer] Add method to estimate window title bar size. 2023-10-03 16:13:52 +03:00
Brian MacIntosh 676627e1d1 "Whole Words" search can detect word boundaries inside the search term.
For example, searching for ".func" will now match in "a.func" even with Whole Words enabled.
2023-10-02 13:47:59 -07:00
Markus Sauermann 781cecdc23 Enable filtering `InputEvent`-sending in `SubViewportContainer`
Introduce an user overridable function, that allows filtering, if
an `InputEvent` should be sent to `SubViewport` children.
2023-10-02 19:51:49 +02:00
Rémi Verschelde 57a6813bb8
Merge pull request #81582 from YuriSizov/graph-toolbarniceness
Make `GraphEdit` toolbar more customizable
2023-10-02 15:18:42 +02:00
Rémi Verschelde 2d6cee48f6
Merge pull request #80555 from GrammAcc/fix-80507
AssetLib: Fix long plugin names breaking the UI
2023-10-02 15:18:38 +02:00
Yuri Sizov b07c664af9 Make `GraphEdit` toolbar more customizable
Also adds a semi-transparent background
to make the toolbar stand out in front of nodes.
2023-10-02 13:43:08 +02:00
Rémi Verschelde 1e819ae3aa
Merge pull request #82590 from YuriSizov/window-you-come-to-me-on-this-day-the-day-when-my-child-becomes-exclusive-with-a-transient-parent-to-ask-for-this
Add more context to some `Window` errors
2023-10-02 13:16:39 +02:00
Rémi Verschelde bc118b36ac
Merge pull request #82370 from YuriSizov/graphs-request-rename-close-delete-please
Rename close requests to delete requests in `GraphEdit`
2023-10-02 13:16:28 +02:00
Rémi Verschelde 0d034447b7
Merge pull request #81648 from 4d49/fix-tab-metadata
Remove the equality check for `TabBar.set_tab_metadata`
2023-10-02 13:16:23 +02:00
Rémi Verschelde 0c7ac25b47
Merge pull request #81174 from BlueCube3310/tree-range-fix
Fix TreeItem range slider not working properly
2023-10-02 13:16:03 +02:00
Rémi Verschelde e95b7e84a4
Merge pull request #80844 from dalexeev/fix-callable-expected-argc
Fix expected argument count for `Callable` call errors
2023-10-02 13:15:53 +02:00
GrammAcc d63a88bef1 AssetLib: Fix long plugin names breaking the UI
The UI was extending past the screen width when loading a page diplaying
a plugin with an especially long title in the asset store plugin.

I implemented a new `EditorAssetLibraryItem::clamp_width` method that
checks that the title text is not longer than the column width minus
some padding and truncates it if it is.

I also noticed that the nav buttons for paginated results were causing the UI to extend past
the screen width on higher editor scales since they were hardcoded to
show ten page buttons if there were enough results. I modified the
pagination slightly to display a dynamic number of nav buttons based on
the editor scale in order to fix this other cause of the same problem.

I had to use the font of the `title`, which is a `LinkButton` in order
to determine the text width, so I added a public getter `get_button_font` to the `LinkButton` class.
2023-09-30 18:16:39 -05:00
Yuri Sizov 53172d9860 Add more context to some `Window` errors 2023-09-30 21:44:05 +02:00
Rémi Verschelde b97af40ac1
Merge pull request #82552 from bruvzg/fd_visible
[FileDialog] Make set_visible compatible with native dialogs.
2023-09-30 11:03:55 +02:00
Bram Buurlage a18f443846 Use Math::round() instead of round() for rounding the scroll position 2023-09-30 11:00:24 +02:00
Bram Buurlage 6ffa9b0635 Editor: fix code editor scrolling experience on track pads 2023-09-30 10:55:14 +02:00
bruvzg c52db6190c
[FileDialog] Make set_visible compatible with native dialogs. 2023-09-30 00:40:49 +03:00
Rémi Verschelde 7469b43392
Merge pull request #77804 from ajreckof/prevent-disapearance-of-mouse-when-SpinBox-is-hidden-while-doing-a-drag-modification
Prevent disappearance of mouse when SpinBox is hidden while dragging
2023-09-29 19:45:03 +02:00
Danil Alexeev aff767ef07
Fix expected argument count for `Callable` call errors 2023-09-29 20:00:10 +03:00
Yuri Sizov 4f0e2ea86e Merge pull request #80699 from aXu-AP/spin-box-comma-decimals
Allow comma as a decimal separator for SpinBox
2023-09-28 20:04:02 +02:00
Rémi Verschelde 048abcb2bb
Merge pull request #82384 from YeldhamDev/corner_cases_man_i_swear
Make hovered tabs be drawn with the unselected's width at minimum
2023-09-27 14:03:43 +02:00
kobewi cfb6d25d30 Document, cleanup and fix some theme properties 2023-09-27 00:06:15 +02:00
Michael Alexsander decae848a8
Make hovered tabs be drawn with the unselected's width at minimum 2023-09-26 15:08:47 -03:00
Yuri Sizov 378ab38b1f Rename close requests to delete requests in `GraphEdit` 2023-09-26 16:41:39 +02:00
Rémi Verschelde ca8b229e1c
Merge pull request #80410 from bruvzg/rtl_img_features
[RTL] Add support for image dynamic updating, padding, tooltips and size in percent.
2023-09-26 13:44:46 +02:00
Rémi Verschelde 21cdedb79c
Merge pull request #77819 from 0xafbf/char-fx-tests
Make it possible to change character transform in RichTextEffect
2023-09-26 13:44:28 +02:00
bruvzg bc6585a5a7
[RTL] Add support for image dynamic updating, padding, tooltips and size in percent. 2023-09-26 09:39:51 +03:00
PucklaMotzer09 d2e651f403 Add Duplicate Lines shortcut to CodeTextEditor
This keyboard shortcut has been made with inspiration from the VS Code keyboard shortcut editor.action.copyLinesDownAction. It duplicates all selected lines and inserts them below no matter where the caret is within the line.
2023-09-25 23:41:31 +02:00
Rémi Verschelde e4cfd4e26a
Merge pull request #82195 from AThousandShips/radian_fix
Replace `radians` range hint with `radians_as_degrees`
2023-09-25 17:18:38 +02:00
Rémi Verschelde 8ddf73c74d
Merge pull request #81939 from YuriSizov/gui-flat-and-depressed
Replace flat buttons with flat-styled buttons with a visible pressed state
2023-09-25 17:18:29 +02:00
Rémi Verschelde 91420573c0
Merge pull request #79965 from KoBeWi/popup_menu_sidequest
Free submenu children when clearing PopupMenu
2023-09-25 17:17:55 +02:00
Rémi Verschelde c57d9f3483
Merge pull request #79104 from DrRevert/focusable_tabs_refactor
Allow to focus individual tabs in `TabBar`/`TabContainer`
2023-09-25 17:17:51 +02:00
Rémi Verschelde 3408aab7c6
Merge pull request #76027 from AThousandShips/focus_direction
Expose finding valid focus neighbors of a `Control` by side
2023-09-25 17:17:33 +02:00
kobewi df24882f9a Free submenu children when clearing PopupMenu 2023-09-25 16:45:41 +02:00
A Thousand Ships e45927b2f2 Replace `radians` range hint with `radians_as_degrees` 2023-09-25 08:50:19 +02:00
Rémi Verschelde df0a822323
Merge pull request #82236 from Chubercik/item_list_separator_fix
Remove the separator from ItemList's thumbnails mode
2023-09-24 23:37:20 +02:00
Rémi Verschelde 42fb795eb8
Merge pull request #80227 from raulsntos/get_tab_bar
Expose the `TabBar` of a `TabContainer`
2023-09-24 23:30:56 +02:00
Jakub Marcowski 2e28fb7cdd Remove the separator from ItemList's thumbnail mode 2023-09-24 13:06:11 +02:00
Raul Santos 408a08f2c1
Expose the `TabBar` of a `TabContainer`
Add `TabContainer::get_tab_bar` method to retrieve the `TabBar` of a `TabContainer`.
2023-09-22 20:08:28 +02:00
aXu-AP 4d3dc0e944 Use comma as a decimal separator for SpinBox
Add support for comma ',' as a decimal separator for SpinBox. This implementation allows for expressions like `pow(2, 3)` to be used as well. If you use comma to separate decimals, use semicolon `;` to separate function parameters.
Change EditorSpinSlider behavior to match.
2023-09-21 15:45:37 +03:00
DESKTOP-UT43QTQ\Garrigan-Desktop 303d0994e9 Avoid resetting the code completion popup excessively 2023-09-20 15:49:25 -05:00
Rémi Verschelde 73d7651784
Merge pull request #81921 from YuriSizov/gui-less-friendliness
Connect `CodeHighlighter` with `TextEdit` without friend-access
2023-09-20 13:10:00 +02:00
Yuri Sizov 4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +02:00
Yuri Sizov fee1fb8290 Connect `CodeHighlighter` with `TextEdit` without friend-access 2023-09-19 14:36:38 +02:00
ajreckof 6afadbaa9f Replace Ctrl in editor shortcuts with Cmd or Ctrl depending on platform 2023-09-19 10:29:07 +02:00
Rémi Verschelde 77623d0a36
Merge pull request #81354 from MJacred/textedit_pixel_pos_fix
Fix `TextEdit.get_rect_at_line_column returning` negative pos even though cursor is in viewable area of the control
2023-09-18 10:37:59 +02:00
Arkadiusz Marcin Kołek 18811ac814 Allow to focus individual tabs in TabBar/TabContainer 2023-09-17 18:49:48 +02:00
Rémi Verschelde 4a48fd4b9f
Merge pull request #63634 from Spartan322/itemlist-predraw-size
Expose and rename ItemList's `_check_shape_changed` to `force_update_list_size`
2023-09-17 14:45:19 +02:00
George L. Albany 421e8c5455
Expose force_update_list_size
Rename ItemList::_check_shape_changed to force_update_list_size

`force_update_list_size` is especially useful for updating the auto_height_value early
2023-09-15 13:18:02 -04:00
PrecisionRender 76fad10978 Expose `PopupMenu` `activate_item_by_event` method 2023-09-15 10:27:49 -05:00
Yuri Sizov 325ec7fdda Merge pull request #81600 from aaronfranke/fix-graph-edit-valid-port-conn-type
Fix GraphEdit port valid connections incorrectly checking sides
2023-09-14 15:21:59 +02:00
Yuri Sizov 56e54b49b6 Merge pull request #81551 from YuriSizov/gui-cache-all-the-theme
Bind remaining theme properties to their respective classes
2023-09-14 15:21:45 +02:00
Mansur Isaev 4982bec8b7 Removes the equality check for `set_tab_metadata`
Makes the code equivalent to the `Tree.set_metadata` code.

Fix: https://github.com/godotengine/godot/issues/81647
2023-09-14 17:07:14 +04:00
Yuri Sizov fe000277ea Bind remaining theme properties to their respective classes
This adds binds for GraphEdit/GraphElement/GraphNode, which were
skipped before due to a rework. This also adds binds for Window,
which was skipped before due to a complicated code organization.

Also adds theme cache entries/direct cache access to a few places
that previously missed it. Some theme properties are now exposed
to other classes via friendships or public getters for convenience.

This removes all string-based theme access from scene/ classes.
2023-09-13 19:31:35 +02:00
Aaron Franke 366e54b0a3
Fix GraphEdit port valid connections incorrectly checking sides 2023-09-12 20:46:43 -05:00
A Thousand Ships a29416e332 [Scene,Main] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-12 12:53:06 +02:00
Rémi Verschelde 5c43e4c1ef
Fix various typos with codespell
Using 2.2.6.dev180+ge3a2cfbd.
2023-09-12 08:54:18 +02:00
Rémi Verschelde 6a007c7512
Merge pull request #81546 from YuriSizov/there-isnt-enough-room-for-two-ways-to-customize-a-dialog-in-this-town-boy
Hide the `dialog_text` property from `FileDialog`
2023-09-12 08:51:09 +02:00
Jean-Michel Bernard 67dce301aa Add code region folding to CodeEdit 2023-09-11 18:36:40 +02:00
Yuri Sizov d0e26572fe Hide the `dialog_text` property from `FileDialog`
It's useless in `FileDialog`, because dialogs can have either
a text label or a custom layout, and `FileDialog` already
has a custom layout.
2023-09-11 16:24:54 +02:00
Rémi Verschelde 013bbd1a1e
Merge pull request #81477 from timothyqiu/aligned
Fix submenu alignment with parent menu item
2023-09-11 15:38:54 +02:00
Rémi Verschelde d08401236c
Merge pull request #81312 from YuriSizov/theme-static-binds
Register theme properties with ThemeDB
2023-09-11 15:38:06 +02:00
Rémi Verschelde ca2d5b25fd
Merge pull request #81094 from OXTyler/81071
Fix SpinBox not clearing text on improper input
2023-09-11 15:37:18 +02:00
Rémi Verschelde afd01030a8
Merge pull request #80956 from MarcusElg/deselectmulticaret
Deselect multi caret when alt clicking on it
2023-09-11 15:36:21 +02:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
MJacred 6170381bd7 Fix TextEdit.get_rect_at_line_column returning negative pos even though cursor is in viewable area of the control 2023-09-11 12:32:36 +02:00
Haoyu Qiu e5ad35a95f Fix submenu alignment with parent menu item 2023-09-09 14:32:21 +08:00
kobewi db4daa5249 Fix FindReplaceBar losing focus too early 2023-09-08 14:46:34 +02:00
Rémi Verschelde baad99220e
Merge pull request #81443 from bruvzg/le_off_del
[LineEdit] Update line edit offset on text delete.
2023-09-08 11:50:49 +02:00
bruvzg 6a1fdc213c
[LineEdit] Update line edit offset on text delete. 2023-09-08 08:58:51 +03:00
Hendrik Brucker 5afe78bd9c Clean up/refactor GraphNode and make it more flexible
Split GraphNode into GraphElement and GraphNode, add custom
titlebar, and adjust theming.
2023-09-07 17:29:06 +02:00
Rémi Verschelde 23ab351a9b
Merge pull request #81396 from bruvzg/te_idir
Fix TextEdit placeholder with Inherited text direction.
2023-09-07 13:54:33 +02:00
Rémi Verschelde 7663c69922
Merge pull request #81388 from YuriSizov/core-gdvirtual-but-less-confused-about-itself
Extract `ScriptInstance` into its own file to simplify includes
2023-09-07 13:53:45 +02:00
Rémi Verschelde 4bf3de7853
Merge pull request #81383 from AThousandShips/valid_remove
Remove unnecessary validity checks from `Button` and `TextureRect`
2023-09-07 13:53:20 +02:00
bruvzg 3842694d4f
Fix TextEdit placeholder with Inherited text direction. 2023-09-07 08:26:10 +03:00
Yuri Sizov d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Yuri Sizov 58126e479c Introduce the concept of global theme contexts
This commit adds the default theme context, which replaces
the need to manually check the project and the default theme
all the time; simplifies related code.

It also adds framework for custom theme contexts, to be used
by the editor. Custom contexts can be attached to any node,
and not necessarily a GUI/Window node. Contexts do no break
theme inheritance and only define which global themes a node
uses as a fallback.

Contexts propagate NOTIFICATION_THEME_CHANGED when one of their
global themes changes. This ensures that global themes act just
like themes assigned to individual nodes and can be previewed
live in the editor.
2023-09-06 19:40:43 +02:00
A Thousand Ships 380db4d03e Remove unnecessary validity checks from `Button` and `TextureRect`
The one in `TextureRect` appears to be a leftover from earlier code, and
the one in `Button` was copied from there.
2023-09-06 16:39:06 +02:00
Yuri Sizov 6f87ab7244 Merge pull request #81268 from timothyqiu/icon-scale-changes
Fix ItemList not updating when icon scale changes
2023-09-06 14:49:13 +02:00
Yuri Sizov 3c63dce3cd Merge pull request #80573 from KoBeWi/2k_lines_of_changes_created_at_2AM
Add EditorStringNames singleton
2023-09-06 14:49:02 +02:00
Rémi Verschelde 92da5a7654
Merge pull request #79792 from Miguel0312/SceneTreeTooltips
Correctly display tooltips for buttons in Tree when they overlap cell content
2023-09-04 09:07:24 +02:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Marcus Elg aac10705d7 Deselect multi caret when alt clicking on it 2023-09-03 19:22:33 +02:00
Haoyu Qiu 1bf4c12c0a Fix ItemList not update when icon scale changes 2023-09-03 19:10:24 +08:00
Rémi Verschelde ae7bab8c37
Merge pull request #81040 from Ymanawat/control-theme-80989
Fix setting TabContainer's `font_hovered_color` theme property
2023-08-31 08:54:29 +02:00
Yogendra Manawat a16fdb05ae Fix scrolling popup_menu On keyboard/controller input 2023-08-30 23:31:22 +05:30
BlueCube3310 c759ac0e4f Fix TreeItem range slider not working 2023-08-30 19:17:13 +02:00
Yogendra Manawat d7bf05b490 Fix TabContainer's font_hovered_color theme property 2023-08-30 21:25:41 +05:30
Chia-Hsiang Cheng 749db00227 Draw separators before selected style boxes 2023-08-30 16:32:58 +08:00
kobewi e21c30ec11 Unfocus LineEdit when pressing Escape 2023-08-29 14:53:49 +02:00
Tyler 468e57dfe5 fixes issue 81071 2023-08-28 17:09:48 -04:00
Rémi Verschelde 541674d106
Merge pull request #81076 from Jordyfel/spinbox
Only allow finite numbers in `Range.value`.
2023-08-28 20:38:22 +02:00
Rémi Verschelde ba1089689a
Merge pull request #80954 from bruvzg/sp_per_font
[Text Server] Store extra spacing of individual font variations.
2023-08-28 20:37:58 +02:00
Jordyfel 78304282f0 Only allow finite numbers in Range.value. 2023-08-28 17:03:17 +03:00
Rémi Verschelde 713bfaf5ea
Merge pull request #81064 from bruvzg/rtl_char_count_line_edge
[RTL] Fix character line index for non-visual characters and characters on the line edge.
2023-08-28 12:12:22 +02:00
Rémi Verschelde 2c0a74a149
Merge pull request #80105 from Sauermann/fix-global-transform
Fix global transform validity for `Node2D` and `Control`
2023-08-28 12:03:53 +02:00
Rémi Verschelde b00796eb1a
Merge pull request #79818 from garychia/select_all
RichTextLabel: Ensure the `select_all` function selects all items
2023-08-28 12:03:29 +02:00
bruvzg 2273509721
[RTL] Fix character line index for non-visual characters and characters on the line edge. 2023-08-28 10:50:01 +03:00
Miguel Pereira 8278a5f274 Correctly display tooltips for buttons in Tree when they overlap cell content 2023-08-27 18:21:12 +02:00
Chia-Hsiang Cheng f93f1952cb Avoid selecting the first item automatically in Open Folder Mode 2023-08-27 17:25:17 +08:00
bruvzg 88177a5a58
[RTL] Use list iterators for item/paragraph removal. 2023-08-25 17:49:13 +03:00
Chia-Hsiang Cheng d66c7a2ac5 Ensure the 'select_all' function selects all items 2023-08-25 21:07:33 +08:00
Danil Alexeev 07d23489f4
GUI: Fix text overlapping icon in `Tree` 2023-08-24 22:09:02 +03:00
A Thousand Ships e70b83c7a0 Expose finding valid focus neighbors of a `Control` by side
Exposes the functionality used for ui navigation
2023-08-24 18:25:35 +02:00
bruvzg 5453503697
[Text Server] Store extra spacing of individual font variations. 2023-08-24 11:58:12 +03:00
Andrés Botero eee95aff04 Add transform support to CharFXTransform
Use absolute transforms for CharFX

fix formatting
2023-08-23 00:18:37 -05:00
Rémi Verschelde 8e0346bade
Merge pull request #80848 from bruvzg/rtl_lang
[RTL] Adds "lang" tag to allow overriding language specific text rendering without starting a new paragraph.
2023-08-21 19:32:29 +02:00
bruvzg 299808cc26
[RTL] Adds "lang" tag to allow overriding language specific text rendering without starting a new paragraph. 2023-08-21 14:56:43 +03:00
bruvzg cd6b0368f6
[RTL] Fix remove_paragraph crashes. 2023-08-21 14:36:07 +03:00
jsjtxietian 70dad7e5a3 Fixes a text find perf issue, if can't find any
match words, just early break the while loop. This
will improve a lot when p_search.length is way too
long since p_from_column will only plus 1 every loop
2023-08-20 21:48:25 +08:00
Rémi Verschelde b51ee8b029
Merge pull request #80650 from bruvzg/comp_char_fix
[TextServer] Fix system font fallback and caret/selection behavior for composite characters.
2023-08-18 17:24:54 +02:00
Rémi Verschelde 0fff0b1054
Merge pull request #80203 from WhalesState/Dev2
Add shortcut handling to `OptionButton`
2023-08-17 11:24:14 +02:00
Rémi Verschelde ef77ae7d6c
Merge pull request #74250 from daBlesr/bugfix-selection-signals-when-disabled-or-not-selectable
ItemList: Clarify distinction between disabled and selected in sending signals
2023-08-17 11:19:17 +02:00
Rémi Verschelde 4b11bc2b34
Merge pull request #36493 from KoBeWi/echo_menus
Add option to allow echo events in menu shortcuts
2023-08-17 11:18:50 +02:00
Niels Drost fa63107bd1
ItemList: Clarify distinction between disabled and selected in sending signals
disabled -> not sending any signal at all (activated, selected, deselected, ...)
selected -> only possible when not disabled, and when selectable

Fixes #74086.
2023-08-17 10:34:18 +02:00
Tomasz Chabora 3dd881b4e4 Add option to allow echo events in menu shortcuts 2023-08-16 16:59:17 +02:00
Koyper e84588987a Enabled missing Tree title button font and font size theme settings. 2023-08-16 08:10:31 -05:00
bruvzg 5d3fcc5766
[TextServer] Fix system font fallback and caret/selection behavior for composite characters. 2023-08-15 11:42:40 +03:00
bruvzg 3709ca5404
[RTL] Improve scroll bar responsiveness during updates. 2023-08-14 11:36:05 +03:00
Ricardo Subtil f0927250ca Support controller input on popup/dialogs 2023-08-13 17:32:08 +01:00
ajreckof 1eb3d99ff7 Fix CodeEdit completion being very slow in certain cases 2023-08-10 08:15:41 +02:00
Rémi Verschelde 3a0086eb6f
Merge pull request #78426 from Daylily-Zeleen/daylily-zeleen/graph_edit_virtual
Make GraphEdit's cpp virtuals equal to gdscript.
2023-08-09 15:20:07 +02:00
Daylily-Zeleen 2f0639e7ae Make GraphEdit's cpp virtuals equal to gdscript. 2023-08-09 00:21:35 +08:00
Rémi Verschelde 0ce1ca4677
Merge pull request #80402 from timothyqiu/overrun-icon
Fix Button text when overrun is not trim nothing
2023-08-08 17:00:46 +02:00
Rémi Verschelde 70e77a8383
Merge pull request #80381 from Calinou/audio-bus-master-use-scenestringnames
Use StringName consistently to refer to the Master audio bus name
2023-08-08 16:59:11 +02:00
Rémi Verschelde b49478acce
Merge pull request #80366 from timothyqiu/option-button-lean-and-mean
Fix OptionButton min size when fit longest item is enabled
2023-08-08 16:58:23 +02:00
Rémi Verschelde 14256a2395
Merge pull request #78468 from KoBeWi/enmarginalization
Fix ColorPicker margin theme property
2023-08-08 16:55:32 +02:00
Markus Sauermann 152572ac38 Fix global transform validity for `Node2D` and `Control`
Set global transform to invalid when changing transform
2023-08-08 12:22:55 +02:00
Haoyu Qiu 7f70ac56a0 Fix Button text when overrun is not trim nothing 2023-08-08 15:08:28 +08:00
Hugo Locurcio 49b6067aba Use StringName consistently to refer to the Master audio bus name 2023-08-07 18:06:17 +02:00
Haoyu Qiu 5dd854513e Fix OptionButton min size when fit longest item is enabled 2023-08-07 17:25:10 +08:00
Hugo Locurcio e9f723006a
Use compile-time Unicode string conversion
Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
2023-08-07 10:38:16 +02:00
Danil Alexeev 5fb975e4a5
GUI: Fix `Tree` performance regression by using cache 2023-08-04 16:11:26 +03:00
Rémi Verschelde 4c70849b3b
Merge pull request #80168 from akien-mga/extension-compat
Fix or workaround recent extension API compatibility issues
2023-08-03 15:12:38 +02:00
Rémi Verschelde ae8f1015e0
Merge pull request #79064 from MewPurPur/rename-button-pressed-THIS-IS-NOT-A-COMPAT-BREAK
Rename `button_pressed` default signal binding to avoid shadowing
2023-08-03 14:46:39 +02:00
Rémi Verschelde 858e8748e8
Fix or workaround recent extension API compatibility issues
- Add compatibility methods for `RenderingDevice::shader_create_from_bytecode`
  and `CodeEdit::get_text_for_symbol_loopup`.
- Silence errors which now have compatibility methods.
- Acknowledge GraphEdit/GraphNode compat breakage, intended and WIP.
2023-08-03 12:07:21 +02:00
Mounir Tohami 2cec27a3f1 Add shortcut handling to OptionButton 2023-08-03 08:38:20 +00:00
Rémi Verschelde 3e958cfa8d
Merge pull request #79705 from 398utubzyt/gui/snap-charfx-fix
GUI: Snap CharFX offset to nearest pixel when setting is enabled
2023-08-02 12:18:46 +02:00
Rémi Verschelde d8cbb6d645
Merge pull request #79563 from danny88881/drag-and-drop-text-setting
Add drag'n'drop text option for `LineEdit` and `RichTextLabel`
2023-08-02 12:17:56 +02:00
Rémi Verschelde 2a9aaae8a5
Merge pull request #79293 from ItsNL/add-accept-dialog-close-on-unfocused
Check `FLAG_POPUP` to close an AcceptDialog when parent is focused
2023-08-02 12:17:06 +02:00
Rémi Verschelde b156e24216
Merge pull request #77280 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
Yuri Sizov 88068a0374 Merge pull request #79946 from Ymanawat/propagate-check-79942
Fix Tree check propagation not unchecking parent items
2023-08-01 20:03:43 +02:00
Markus Sauermann 1c3c17c608 Refactor mouse_entered and mouse_exited notifications
The previous implementation for signals mouse_entered and mouse_exited
had shortcomings that relate to focused windows and pressed mouse buttons.
For example a Control can be hovered by mouse, even if it is occluded by
an embedded window.

This patch changes the behavior, so that Control and Viewport send
their mouse-enter/exit-notifications based solely on mouse position,
visible area, and input restrictions and not on which window has
focus or which mouse buttons are pressed. This implicitly also
changes when the mouse_entered and mouse_exited signals are sent.

This functionality can not be implemented as a part of
Viewport::_gui_input_event, because of its interplay with Windows and
because Viewport::_gui_input_event is based on input and not on
visibility.
2023-08-01 13:28:49 +02:00
Yogendra Manawat f0362cd37b Fixed Tree Selection Bug 2023-07-29 00:30:39 +05:30
Yuri Sizov 7305318a88 Merge pull request #79913 from bruvzg/lbl_min_h_line
[Label] Remove extra line spacing from Label minimum size calculations.
2023-07-26 18:40:42 +02:00
Yuri Sizov d50c52652f Merge pull request #79805 from kumikumi/fix-subviewport-cursor
Prevent SubViewportContainer overriding Subviewport's cursor with its own cursor
2023-07-26 18:40:30 +02:00
Yuri Sizov 67873d0d5d Merge pull request #79248 from Sauermann/fix-svc-focus-propagation
Make `SubViewportContainer` event propagation aware of focused Control
2023-07-26 18:39:57 +02:00
bruvzg 16d7e0bf98
[Label] Remove extra line spacing from Label minimum size calculations. 2023-07-26 08:15:53 +03:00
Yuri Sizov d06779cc07 Merge pull request #79782 from guemax/remove-spaces-from-input-of-html-color-in-color-picker
Remove spaces from input of HTML color in color picker
2023-07-24 19:33:34 +02:00
Yuri Sizov fb2c3ae8f7 Merge pull request #79308 from Geometror/refactor-graphedit
Clean up/refactor GraphEdit
2023-07-24 19:32:33 +02:00
Yuri Sizov 2bd904e3db Merge pull request #73196 from Vilcrow/fix-lookup-symbol
Fix jumping to function definition using `Ctrl+LMB` or the "Lookup Symbol" button
2023-07-24 19:32:12 +02:00
Hendrik Brucker a38fd09669 Clean up/refactor GraphEdit 2023-07-24 18:37:23 +02:00
Yuri Sizov 91258e52be
Merge pull request #79307 from Geometror/remove-graph-node-comment
Remove GraphNode's comment property and related functionality
2023-07-24 16:56:41 +02:00
Mikko Ankkala 96b26574b9 Don't override SubViewport's cursor with SubViewportContainer's cursor
Add a warning for having a non-default value of `mouse_default_cursor_shape` in SubViewportContainer

Add test
2023-07-23 22:27:55 +03:00
guemax d934d00828
Remove spaces from input of HTML color in color picker
Fixes #79338
2023-07-22 12:11:28 +02:00
Yuri Sizov e38dc58199 Merge pull request #76759 from Nidjo123/master
Fix RichTextLabel character line and paragraph index getters
2023-07-21 17:54:11 +02:00
398utubzyt aac2dfc1b4 Snap CharFX transforms to pixels when enabled 2023-07-20 06:01:08 -07:00
unknown cfe98c57b9 Add drag and drop option for line edit and rich text label 2023-07-19 22:18:34 -04:00
NL a77d8b3eb5 Check FLAG_POPUP to close an AcceptDialog when parent is focused 2023-07-19 16:06:02 +02:00
Yuri Sizov e8aa8c17d2
Merge pull request #79574 from bruvzg/win_nat_d
[Windows] Implement native file selection dialog support.
2023-07-18 19:04:40 +02:00
bruvzg d3ca91ad6a [Windows] Implement native file selection dialog support. 2023-07-18 17:23:58 +03:00
Markus Sauermann e6386bc843 Make `SubViewportContainer` event propagation aware of focused Control
Propagate `InputEvents` without position either
- during the Input-stage, when it has focus or
- during the Unhandled-Input-stage, otherwise

This makes sure that Gui-Input happens in the correct order.

Move "Unhandled key Input" handling before "Unhandled Input" handling,
so that Unicode input with Alt / Ctrl modifiers are sent to the nodes
in the correct order.

Change the default focus mode of `SubViewportContainer` from
`FOCUS_NONE` to `FOCUS_CLICK`, to automatically remove focus from
other `Control`-nodes, when clicking inside a `SubViewport`.
2023-07-17 22:38:35 +02:00
kobewi de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
Yuri Sizov 5954c58ee1
Merge pull request #79494 from timothyqiu/no-longer
Update OptionButton min size when disabling Fit to Longest Item
2023-07-17 19:12:03 +02:00
Hendrik Brucker a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
Haoyu Qiu 5384c1a579 Update OptionButton min size when disabling Fit to Longest Item 2023-07-15 11:10:23 +08:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Yuri Sizov 7b0f8d76ad Merge pull request #79455 from timothyqiu/button-clip-internal
Fix Button clipping when internal margins exist
2023-07-14 18:50:15 +02:00
Yuri Sizov 5c56206e6c Merge pull request #79011 from bruvzg/pop_all
[RTL] Add `pop_all`, `push_context` and `pop_context` methods, and use it for `print_rich` to avoid unclosed tags.
2023-07-14 18:49:21 +02:00
Haoyu Qiu 71430cdd48 Fix Button clipping when internal margins exist 2023-07-14 13:59:16 +08:00
bruvzg 4790da7900
[macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +03:00
Yuri Sizov f49169d6d6 Merge pull request #79037 from dinoplane/move-cached-values
Move cached values into `color_mode.cpp` and apply fixes to OKHSL
2023-07-12 21:02:47 +02:00
S.V.I. Vilcrow 56e2fad319 Fixed the jumping to function definition using 'Ctrl+LMB' and the 'Lookup Symbol' button. 2023-07-12 21:30:35 +03:00
Yuri Sizov 5058831cf6 Merge pull request #78100 from KoBeWi/commit_necromancy
Use S, V in hue bar of ColorPicker
2023-07-12 17:15:03 +02:00
Yuri Sizov 1978b7c717 Merge pull request #77858 from kinami-imai/expose_videostreamplayer_video_length
Expose VideoStreamPlayer video length
2023-07-12 17:14:44 +02:00
Yuri Sizov 216aa450a6 Merge pull request #77857 from kinami-imai/add_loop_property_to_videostreamplayer
Add `loop` property to VideoStreamPlayer
2023-07-12 17:14:38 +02:00
Yuri Sizov 5167bed9f0 Merge pull request #79053 from Daylily-Zeleen/daylily-zeleen/rich_text_label_missing_default_method_value
Bind missing default value for `RichTextLabel` methods.
2023-07-12 15:09:41 +02:00
Yuri Sizov 509645b038 Merge pull request #78777 from YeldhamDev/tab_hover_fix
Fix delay on tab resizing when (un)hovering tabs
2023-07-12 15:09:31 +02:00
Yuri Sizov 5dff3c4484 Merge pull request #78538 from Sauermann/fix-code-simplifications
Remove unnecessary value assignments throughout the codebase
2023-07-12 15:09:26 +02:00
Yuri Sizov 631d51c46c Merge pull request #78476 from Sauermann/fix-embedded-safe-area
Embedded Popups store their safe_rect in their embedder
2023-07-12 15:09:20 +02:00
Yuri Sizov b54d6cf466 Merge pull request #78393 from AThousandShips/tree_tooltip
Add ability to set the tooltip text of a `TreeItem` button
2023-07-12 15:09:09 +02:00
Yuri Sizov 7550b02dfc Merge pull request #77117 from Calinou/richtextlabel-add-pulse-effect
Add a `[pulse]` built-in effect to RichTextLabel
2023-07-12 15:08:43 +02:00
Yuri Sizov b4a11294e6 Merge pull request #75460 from joao-pedro-braz/add_new_item_stylebox_to_the_tree_control
Add a new "inner_item_margin" Theme constant to the Tree control
2023-07-12 15:08:36 +02:00
kleonc 30a9c90785 Hide/show AcceptDialog's button spacer on button visibility changed 2023-07-11 12:18:46 +02:00
Daylily-Zeleen 4029a05fae Add missing default value for RichTextLabel method 2023-07-11 11:17:45 +08:00
Hendrik Brucker 662d8c76b3 Remove GraphNode's comment property and related functionality
(this functionality will be reintroduced in a new and more flexible way)
2023-07-11 02:05:25 +02:00
Yuri Sizov bbb11004e7
Merge pull request #78776 from NiskashY/fix-disabled-slider-highlighting
Fix disabled slider highlighting
2023-07-10 12:32:39 +02:00
bruvzg 5216a08617
[RTL] Add `pop_all`, `push_context` and `pop_context` methods, and use it for `print_rich` to avoid unclosed tags. 2023-07-09 19:53:15 +03:00
Rémi Verschelde 1017077b7f
Merge pull request #79211 from HolonProduction/file-dialog-button-update
Update FileDialog button activity when file_mode is changed.
2023-07-09 12:24:35 +02:00
Rémi Verschelde 6ab727edc2
Merge pull request #78835 from Dragoncraft89/patch-1
Fix invalid minimum size for translated messages in option button
2023-07-08 18:19:25 +02:00
Rémi Verschelde a12d9df9e1
Merge pull request #71024 from marzecdawid/better-cursor-behaviour-in-tree-with-ctrl
Fix cursor behavior for multiselect in Tree while holding CTRL
2023-07-08 18:14:48 +02:00
HolonProduction cfac7c9a9a Update FileDialog button activity when file_mode is changed. 2023-07-08 18:10:57 +02:00
NiskashY 4394936392 Fix disabled slider highlighting 2023-07-08 00:42:57 +03:00
Markus Sauermann bfa7497c1b Revert "Fix focusloss of non-exclusive `AcceptDialog` with `close_on_escape`"
This reverts commit 7f547fcf09.
2023-07-06 01:04:16 +02:00
MewPurPur 3d128f67a4 Rename button_pressed bindings to avoid shadowing 2023-07-05 18:38:18 +02:00
dinoplane 3f02b0cfde Moved HSV and OKHSL caching logic into color_mode 2023-07-05 07:15:58 -07:00
Rémi Verschelde 1b38e9258b
Merge pull request #78975 from YuriSizov/rtl-fix-refactoring-typo
Prevent crash when processing line caches in `RichTextLabel`
2023-07-03 15:26:31 +02:00
Yuri Sizov 40f2227a65 Prevent crash when processing line caches in RichTextLabel 2023-07-03 13:33:51 +02:00
bruvzg 21365606d3
[RTL] Fix multithreaded scrollbar visibility update 2. 2023-07-03 10:34:42 +03:00
Florian Kothmeier c33748d954 Fix invalid minimum size for translated messages in option button 2023-06-29 15:01:36 +02:00
bruvzg ec97c7c1d9
[RTL] Fix multithreaded scrollbar visibility update. 2023-06-29 15:37:54 +03:00
Michael Alexsander 7ffad29df8
Fix delay on tab resizing when (un)hovering tabs 2023-06-27 20:33:13 -03:00
Hendrik Brucker 1e8ca95cdc [GraphEdit] Fix port hotzones at zoom levels other than 100% 2023-06-25 17:13:53 +02:00
Rémi Verschelde f24f615b04
Merge pull request #78556 from QbieShay/qbe/hotzonehotfix
Fix regression in visual nodes hotzones
2023-06-23 08:47:56 +02:00
QbieShay 237e3c6099 Fix regression in visual nodes hotzones 2023-06-22 19:03:17 +02:00
dinoplane e11e9d2b9a Use cached saturation for color picker when value is 0 2023-06-21 15:18:20 -07:00
Markus Sauermann 890fdd56df Code simplifications
CPPcheck found most of them.

no need to assign the variable twice:
- AnimationTrackEditTypeAudio
- SSEffects

variable is assigned in all if-else clauses:
- EditorHelp
- AndroidInputHandler
- MenuBar
- ShaderCompiler

same if clause:
- ItemList

clearing an empty bitfield has no effect:
- Viewport
2023-06-21 22:37:26 +02:00
Dawid Marzec 9abbdea95e Fix cursor behaviour in Tree while holding CTRL 2023-06-21 20:44:29 +02:00
MewPurPur 6e182d41f4 Hide breakpoint indicator when mouse leaves CodeEdit 2023-06-21 11:30:40 +02:00
Markus Sauermann a12627765f Embedded Popups store their safe_rect in their embedder
Storing it in the DisplayServer didn't make sense in this case,
because the embedded window is unknown to the DisplayServer.
2023-06-20 18:06:26 +02:00
kobewi 9c3afcc898 Fix ColorPicker margin theme property 2023-06-20 12:47:52 +02:00
Rémi Verschelde 94a4da9de6
Merge pull request #78236 from AThousandShips/nine_tex_fix
Make `NinePatchRect` listen to texture changes
2023-06-20 09:21:15 +02:00
Rémi Verschelde 0653f7a5b0
Merge pull request #77722 from ApplecrispEric/drag-drop-autocomplete
Cancel autocomplete after initiating drag
2023-06-20 09:20:52 +02:00
Ninni Pipping 4492f7ff97 Make `NinePatchRect` listen to texture changes 2023-06-20 08:40:35 +02:00
Eric Brown 42bc437615 Changed autocomplete to cancel when the user begins a drag 2023-06-19 15:44:13 -07:00
Ninni Pipping 75b355ee99 Add ability to set the tooltip text of a `TreeItem` button 2023-06-18 11:14:32 +02:00
Markus Sauermann 7f547fcf09 Fix focusloss of non-exclusive `AcceptDialog` with `close_on_escape`
Fix, that a non-exclusive AcceptDialog with `close_on_escape == true`
gets closed, when the parent window of the parent window receives focus.

There is no need to rely on the focus of the parent visible window.
Instead check if the AcceptDialog loses focus.
2023-06-17 11:05:36 +02:00
Rémi Verschelde c65aba7aff
Merge pull request #78321 from ajreckof/fix-wrong-alphabetical-order-in-autocompletion-sorting
Fix wrong order in autocompletion sorting with empty string to complete.
2023-06-16 16:52:27 +02:00
ajreckof e9a2060b27 Fix wrong alphabetical order in autocompletion sorting.
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-06-16 14:04:07 +02:00
Markus Sauermann 390aa2a565 Fix ButtonGroup unpressing
It was possible to unpress a button group that had `allow_unpress = false`
using shortcuts.
Adjust `BaseButton::shortcut_input` to use the same logic as
`BaseButton::on_action_event`.
2023-06-16 00:15:37 +02:00
Rémi Verschelde a48285db7b
Merge pull request #78269 from Sauermann/fix-menubutton-popup-position
Fix position and size of MenuButton popup
2023-06-15 16:08:40 +02:00
Rémi Verschelde 95a9089fdd
Merge pull request #74813 from bruvzg/text_edit_autowrap
[TextEdit] Expose all auto-wrap modes.
2023-06-15 16:08:21 +02:00
Markus Sauermann d41665eb5e Fix position and size of MenuButton popup
Use the same logic as in OptionButton::show_popup
2023-06-15 15:29:50 +02:00
Rémi Verschelde 6587a81910
Merge pull request #78268 from Sauermann/fix-remove-unused-variable
Remove unused variable `PopupMenu::parent_rect`
2023-06-15 15:26:36 +02:00
Markus Sauermann 840e2b14f3 Remove unused variable `PopupMenu::parent_rect`
This private variable is not read anywhere.
Remove it and all places, where it is set.
2023-06-15 12:08:47 +02:00
bruvzg cda9cd7587
[RTL] Fix multithreaded resizing. 2023-06-14 23:15:16 +03:00
bruvzg 38b8e23206
[RTL] Fix parsing tags with multiple features. 2023-06-13 15:24:30 +03:00
bruvzg 75e6ec8874
[TextEdit] Expose all auto-wrap modes. 2023-06-13 10:28:27 +03:00
bruvzg 488626701d
Fix editor log flicker. 2023-06-12 20:15:23 +03:00
Rémi Verschelde fa536571a4
Merge pull request #77667 from RedworkDE/text-edit-selection-crash
Fix crash when selecting lines in text edit
2023-06-12 17:10:04 +02:00
Rémi Verschelde b02dd1c2a3
Merge pull request #78092 from KoBeWi/must_protecc_selection
Preserve selection when focusing SpinBox
2023-06-12 14:14:44 +02:00
Rémi Verschelde 1b5620d2a9
Merge pull request #78009 from YuriSizov/gui-gently-massage-minimal-size
Ensure that controls update all their sizing information when required
2023-06-12 14:14:20 +02:00
Rémi Verschelde 9fdce6635b
Merge pull request #77880 from AThousandShips/get_node_fix
Use `get_node_or_null` when null checks are present
2023-06-12 11:39:54 +02:00
dinoplane a374c7d519
Use cached hue for color picker when saturation is 0
Fixes #76968.
2023-06-12 10:59:33 +02:00
kobewi e22319ced3 Use S, V in hue bar of ColorPicker 2023-06-11 01:37:29 +02:00
kobewi 968c5f6247 Preserve selection when focusing SpinBox 2023-06-10 21:29:24 +02:00
Ninni Pipping 0c16082e1e Use `get_node_or_null` when null checks are present
Avoids duplicate or unnecessary errors
2023-06-10 13:22:56 +02:00
Rémi Verschelde 37d1dfef9d
Merge pull request #78000 from RandomShaper/let_users_mess_up
Let user scripts disable thread safety checks
2023-06-10 12:12:13 +02:00
Ninni Pipping dcd2b883eb Use NULL instead of COND checks when appropriate
Restricted to scene
2023-06-10 08:56:30 +02:00
Pedro J. Estébanez 2b001db76e Let user scripts disable thread safety checks 2023-06-09 18:24:01 +02:00
Rémi Verschelde 4d05edd75d
Merge pull request #77901 from bruvzg/rtl_canvas
Fix incorrect node placement in RTL layout when parent is non-Control canvas item.
2023-06-09 12:15:32 +02:00
bruvzg b23f259e67
[Label] Add support for tab stops. 2023-06-09 12:59:37 +03:00
Rémi Verschelde 577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Yuri Sizov ccaab0e590 Ensure that controls update all their sizing information when required 2023-06-08 17:41:03 +02:00
Rémi Verschelde bd62d8ee10
Merge pull request #77802 from dalexeev/tree-add-autowrap-mode
Tree: Add ability to configure text autowrap mode for individual cells
2023-06-07 11:02:02 +02:00
Yuri Sizov df26066ce9 Revert "Make sure that `data.last_minimum_size` is consistent with `get_combined_minimum_size()` at the same time"
This reverts commit 594852caf1.
2023-06-06 20:55:03 +02:00
Rémi Verschelde 46c4068821
Merge pull request #77170 from lawnjelly/scu_build_master
Add support for single compilation unit builds
2023-06-06 17:58:09 +02:00
lawnjelly b69c8b4791 Single Compilation Unit build.
Adds support for simple SCU build (DEV_ENABLED only).
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-06-06 15:36:51 +01:00
Yuri Sizov b99a02387d
Merge pull request #77856 from kinami-imai/videostreamplayer_seamless_loop
Fix VideoStreamPlayer seamless loop
2023-06-06 12:36:48 +02:00
bruvzg 66ea0006e0
Fix incorrect node placement in RTL layout when parent is non-Control canvas item. 2023-06-06 11:49:05 +03:00
今井きなみ 15719e278b Add loop property to VideoStreamPlayer 2023-06-05 21:37:11 +02:00
今井きなみ e3da9176a0 Expose VideoStreamPlayer video length 2023-06-05 21:30:38 +02:00
今井きなみ 270bc93b95 Fix VideoStreamPlayer seamless loop 2023-06-05 21:17:48 +02:00
Hugo Locurcio 70e6c3cbb0
Add a `[pulse]` built-in effect to RichTextLabel
In games, blinking text is one of the more frequently used animations.
It can be (sparingly) used to bring attention to important messages
in a chat log or inventory tooltip, for instance.

This effect accepts the following options:

- `freq`: How fast text blinks (higher is faster).
- `color`: The target color multiplier for blinking.
  The default mostly fades out text, but not entirely (for better accessibility).
- `ease`: The easing function exponent to use.
  Negative values provide in-out easing, which is why `-2.0` is the default.
2023-06-05 18:45:00 +02:00
Rémi Verschelde e7d2e49688
Merge pull request #77765 from Sauermann/fix-acceptdialog-event-handled
Fix that button presses don't set event as handled in AcceptDialog
2023-06-05 18:27:33 +02:00
Rémi Verschelde f00c971b81
Merge pull request #63168 from Levrault/master
Fix: InputEventJoypadMotion should trigger only once on a vslider
2023-06-05 18:04:39 +02:00
Luc-Frédéric Langis 166ca77f20 feat(gamepad): improve gamepad behavior with slider and popup_menu 2023-06-05 10:20:46 -04:00
ajreckof 0c4d37e682 Prevent disapearance of mouse when SpinBox is hidden while doing a drag modification. 2023-06-03 14:50:03 +02:00
Danil Alexeev 010829f962
Tree: Add ability to configure text autowrap mode for individual cells 2023-06-03 15:17:35 +03:00
Aaron Franke 8b42297d7c
Make `Viewport::gui_get_focus_owner` const 2023-06-02 12:36:10 -05:00
Aaron Franke d3e4db4a7b
Fix crash when removing SpinBox during text submit 2023-06-02 10:29:22 -05:00
Yuri Sizov ca1b4eb225
Merge pull request #77651 from Rindbee/fix-update-minimum-size
Make sure that `data.last_minimum_size` is consistent with `get_combined_minimum_size()` at the same time
2023-06-02 14:02:04 +02:00
Yuri Sizov 6a1d3198d1
Merge pull request #76854 from CapitaineCookie/fix-change-type
Fix crash when changing node type from PopupMenu to ItemList
2023-06-02 13:03:55 +02:00
João Pedro Braz 670b7bec9a Add the "inner_item_margin" Theme constant to the Tree control
This PR adds the "inner_item_margin" Theme constant to the Tree Control.
It behaves like a horizontal padding (in CSS), but only in the active
writing direction (So on LTR it'll apply a left padding and on RTL right
padding).

The Editor Theme has been updated to make use of this and a result items
in Trees and ItemLists no longer "hugs" their border, expressing a proper
spacing instead.
2023-06-02 11:32:40 +02:00
Markus Sauermann dc434ef849 Fix that button presses don't set event as handled in AcceptDialog 2023-06-02 11:06:41 +02:00
Rindbee 594852caf1 Make sure that `data.last_minimum_size` is consistent with `get_combined_minimum_size()` at the same time
Move the code for switching `data.minimum_size_valid` in `Control::update_minimum_size()`
to `Control::_update_minimum_size()`, make sure to switch `data.minimum_size_valid` to
`false` only before updating `data.last_minimum_size` , so that it will remain consistent
with `get_combined_minimum_size()`.
2023-06-01 19:02:42 +08:00
Yuri Sizov 3ed7bdc26f Implement `TreeItem.add_child` 2023-05-31 11:36:23 +02:00
RedworkDE 6b7008b73b Fix crash when selecting lines in text edit 2023-05-30 20:32:44 +02:00
Yuri Sizov 6dd5ccdedd
Merge pull request #66625 from Sauermann/fix-move-child-update
Create a virtual mouse move event after moving child nodes in tree
2023-05-30 15:57:21 +02:00
Rémi Verschelde df30c9d6e7
Merge pull request #77507 from Igorrreha/fix/line-edit-expanding-to-text
Fix LineEdit expanding to text length
2023-05-30 09:32:30 +02:00
Markus Sauermann ce10ca6979 Create a virtual mouse move event after moving child nodes
This updates mouse cursor and mouse-over-states without the need
for additional mouse movements.
2023-05-29 22:46:19 +02:00
Yuri Sizov f3983b59f4
Merge pull request #77159 from AThousandShips/texture_button_fix
Make `TextureButton` and `Button` update on texture change
2023-05-29 17:31:32 +02:00
Yuri Sizov ee7b26403b
Merge pull request #77433 from YuriSizov/editor-reparented-popups-fix
Fix auto-reparenting logic in the `ProgressDialog`
2023-05-29 17:30:46 +02:00
Yuri Sizov 4c5c7cbb58 Fix auto-reparenting logic in the `ProgressDialog`
* Make sure `Popup` signals are disconnected when unparented.
* Remove a fail condition from `Window::is_embedded` when
not in tree.
2023-05-29 17:02:16 +02:00
Ninni Pipping d4ac3b6ded Make `TextureButton` and `Button` update on texture change 2023-05-29 16:40:56 +02:00
bruvzg be42ff0ef4
Fix MenuBar item order in RTL layout. 2023-05-29 17:03:49 +03:00
Igorrreha d8886e1a0c Fix LineEdit expanding to text length
Fix for issue #77474

Remove wrong tab

Change the comment to more relevant

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-05-26 23:42:03 +07:00
Ninni Pipping 44a5b710f5 Unify item indexing in `PopupMenu` 2023-05-24 15:58:50 +02:00
Rémi Verschelde 5562100d33
Merge pull request #77411 from saki7/control-get_drag_data-const
Expose `Control::_get_drag_data()` as non-const function
2023-05-24 08:49:57 +02:00
Rémi Verschelde a1058313a9
Merge pull request #75622 from joao-pedro-braz/parse_string_paths_with_quotes_correctly_bb_code
Make sure to normalize subtags when parsing BBCode
2023-05-24 08:45:35 +02:00
Rémi Verschelde 3512d18884
Merge pull request #71040 from marzecdawid/fix-input-lock-in-tree
Remove up/down input for text search in Tree
2023-05-24 08:43:27 +02:00
Rémi Verschelde adbdf9a86e
Merge pull request #77234 from RandomShaper/fix_rtl_mt
Allow threads to mark themselves as safe for nodes
2023-05-24 08:42:59 +02:00
Pedro J. Estébanez e725b4b02b Allow threads to mark themselves as safe for nodes 2023-05-24 00:22:58 +02:00
João Pedro Braz 8b6e57256f Make sure to normalize subtags when parsing BBCode
This PR makes it so that all subtags are normalized before usage.
Normalization means removing any leading and/or trailing quotation marks
from any given subtag.

Fixes: https://github.com/godotengine/godot/issues/75501
2023-05-23 18:55:06 -03:00
Nana Sakisaka 3dbd47ecb6 Expose Control::_get_drag_data() as non-const function 2023-05-24 06:09:45 +09:00
Dawid Marzec 9fe1d6aa27 Remove up/down input for text search in Tree 2023-05-23 21:41:10 +02:00
Rémi Verschelde 8f9e0672fb
Merge pull request #77297 from puchik/popup-close-key-mapping
Use defined key mapping for closing popups and dialogs
2023-05-23 19:14:31 +02:00
ajreckof 006e899bb3 sort code completions with rules
Fixups

Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible

Trying again to improve code completion

Sort code autocompletion options by similarity based on input

To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.

It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.

Also moves CodeCompletionOptionCompare to code_edit.cpp

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
Rémi Verschelde a30a55dd1f
Merge pull request #77166 from bruvzg/item_list_rtl
[ItemList] Fix item text positions in RTL mode.
2023-05-22 13:48:54 +02:00
Rémi Verschelde 0f0f233d37
Merge pull request #76751 from anvilfolk/swatch
Fix adding colors to swatches not updating in previous ColorPickers.
2023-05-22 13:48:43 +02:00
Rémi Verschelde 405fe7aa1a
Merge pull request #76401 from bruvzg/rtl_tab_stops
[RichTextLabel] Add support for tab stops.
2023-05-22 13:48:35 +02:00
Rémi Verschelde 5ac6e9232b
Merge pull request #74962 from KoBeWi/pick_outside_the_box
Improve color picking
2023-05-22 13:48:26 +02:00
ocean (they/them) a132ed0ca4 Fix adding colors to swatches not updating in previous ColorPickers.
ColorPicker was only updating colors if its swatches were empty. It
should always update from the cache in case some other ColorPicker
updated the swatch cache.
2023-05-21 17:50:14 -04:00
Arman Elgudzhyan 8ab2cf3d2d Use defined key mapping for closing popups and dialogs
As opposed to hardcoding the escape key. Also removed such hardcoding in a few other places as well as a hardcoded enter key in one of the affected input fields.
2023-05-20 17:39:59 -07:00
bruvzg fb78889904
[RichTextLabel] Add support for tab stops. 2023-05-20 22:58:51 +03:00
bruvzg 343c35e7b0
[ItemList] Fix item text positions in RTL mode. 2023-05-20 22:58:02 +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
Yuri Sizov 605e25656f
Merge pull request #77242 from novalis/slider-remove-active
Stop dragging when `Slider` changes editability
2023-05-19 17:17:13 +02:00
David Turner 7d6b44c5a4 Stop dragging when a slider changes editability 2023-05-19 10:20:42 -04:00
kobewi b76ddeda45 Improve color picking 2023-05-19 14:21:43 +02:00
Rindbee 9bd1d3b5c8 Update size or size cache when toggling `expand_icon` in `Button`
When the `expand_icon` is switched, the size cache can be updated to
solve the issue that the cache cannot be updated when the `OptionButton`
is enabled with `fit_to_longest_item`.
2023-05-17 06:06:25 +08:00
Rémi Verschelde d61827af05
Merge pull request #76605 from Rindbee/fix_get_visible_line_count
Fix calculation bug with `TextEdit::get_line_height()`
2023-05-16 10:59:52 +02:00
Rémi Verschelde 59c19a7172
Merge pull request #75250 from bruvzg/lbl_rtl_jst_flags
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification.
2023-05-16 10:48:45 +02:00
Rémi Verschelde 8cfa19a078
Merge pull request #77000 from reduz/make-more-base-nodes-thread-safe
Make more base nodes thread safe
2023-05-16 00:31:56 +02: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
Juan Linietsky 0a9f72d5a8 Make more base nodes thread safe
Ongoing work to make more of the base nodes thread safe.
2023-05-15 16:54:10 +02:00
Rindbee 391bce44b7 Fix calculation bug with `TextEdit::get_line_height()`
When `get_line_height()` is less than `1`, there is no visible text.
So limit the return value of `get_line_height()` to **not less** than
`1` for calculation.
2023-05-15 07:16:00 +08:00
Clement C 999a1fffec Fix crash when changing node type from PopMenu to ItemList 2023-05-12 23:29:52 +02:00
Ninni Pipping e5fdce7ca3 Add `get_item_rect` function to `ItemList` 2023-05-11 19:01:54 +02:00
Rémi Verschelde a745bf3802
Merge pull request #76826 from AThousandShips/item_list_fix
Minor bugfixes to `ItemList`
2023-05-11 11:47:33 +02:00
Rémi Verschelde 4020cc8acb
Merge pull request #76794 from Wiwip/inline-edit
Inline editor for the file system dock
2023-05-11 11:46:45 +02:00
Hendrik Brucker dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +02:00
Wiwip b08a6084af Modifies the file system dock to use the inline editor instead of a dialog.
*Bugsquad edit:* Closes https://github.com/godotengine/godot-proposals/issues/4933
2023-05-10 18:49:35 -04:00
Rémi Verschelde 4d703280d5
Merge pull request #76532 from dalexeev/tree-fix-multiline-drawing
Fix multiline items drawing in `Tree`
2023-05-10 10:19:37 +02:00
Rémi Verschelde e0df3be64f
Merge pull request #70286 from the-sink/popupmenu_icon_modulate
Add icon_modulate set/get functionality to PopupMenu
2023-05-09 10:44:19 +02:00
Rémi Verschelde 72323a57d0
Merge pull request #57894 from Sauermann/fix-subviewport-1
Fix unrestricted mouse-event propagation to SubViewports for Physics-Picking
2023-05-09 10:43:49 +02:00
the-sink a85eef4367 Add icon_modulate functionality to PopupMenu 2023-05-08 15:25:00 -07:00
Rémi Verschelde 704560cc3c
Merge pull request #70868 from Maran23/4-x-scrollcontainer-custom-step-editor
Expose horizontal/vertical `custom_step` as editor property for the `ScrollContainer`
2023-05-08 13:52:18 +02:00
Rémi Verschelde 720869fe5e
Merge pull request #76809 from YeldhamDev/cursor_mania
Add more uses of appropriate cursors when resizing/moving some UI nodes
2023-05-08 12:21:04 +02:00
Rémi Verschelde eb6d6ab29f
Merge pull request #76658 from Paulb23/convert-indent-code-edit
Move convert_indent into CodeEdit
2023-05-08 12:20:37 +02:00
Rémi Verschelde 32fbba4bf6
Merge pull request #76472 from jmb462/multicarets_selection_popup
Fix right click in selection of additional caret
2023-05-08 12:20:25 +02:00
Rémi Verschelde eebb1d8eff
Merge pull request #74369 from Dragoncraft89/master
Implement vertical icon alignment for buttons
2023-05-08 12:20:11 +02:00
Rémi Verschelde e758164ba6
Merge pull request #72376 from MewPurPur/fix-color-button-popup
Fix popup position of color picker
2023-05-08 12:20:07 +02:00
Ninni Pipping fffa577b3b Minor bugfixes to `ItemList`
* Removed unused position code in `gui_input`
* Ensured `set_fixed_icon_size` updates cached size
2023-05-08 10:25:08 +02:00
Jean-Michel Bernard 5c06c030f2 Fix right click in selection of additional caret 2023-05-08 00:02:56 +02:00
Michael Alexsander 8118d0d2f5 Add more uses of appropriate cursors when resizing/moving some UI nodes 2023-05-07 11:14:57 -03:00
Paulb23 0b3fba45c6 Move convert_indent into CodeEdit 2023-05-07 13:08:37 +01:00
Nikola Bunjevac e2536d0643 Fix RichTextLabel character line and paragraph index getters 2023-05-05 21:10:27 +02:00