Commit graph

4273 commits

Author SHA1 Message Date
Rémi Verschelde
c9e0d787fe
Merge pull request #67928 from YeldhamDev/we_really_need_a_callback_for_after_children_is_removed
Fix problems with `tab_changed` signal when removing multiple tabs at once
2022-11-02 22:36:49 +01:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Rémi Verschelde
39cece382d
Merge pull request #68170 from alfredbaudisch/clear-selection-shortcut
Unified shortcut to clear carets and selections from TextEdit
2022-11-02 18:54:19 +01:00
Rémi Verschelde
7488b4724e
Merge pull request #67788 from 98teg/flow-container-alignment
Add alignment options to flow container
2022-11-02 18:52:53 +01:00
Alfred Reinold Baudisch
a862583d05 Unified shortcut to clear carets and selections
Refactors`ui_text_remove_secondary_carets` from https://github.com/godotengine/godot/pull/68089 as `ui_text_clear_carets_and_selection`, with extra behaviour:

- If there's only one active caret active with a selection, clears the selection.
- In case there's more than one caret active, removes the secondary carets and clears selections.

With this change, `TextEdit` then imitates the behaviour of VSCode for clearing carets and selections.
2022-11-02 18:23:24 +01:00
Rémi Verschelde
06c8e406e4
Merge pull request #63335 from Spartan322/button-shortcut-feedback
Make `BaseButton` Shortcut feedback togglable
2022-11-02 17:14:00 +01:00
Rémi Verschelde
eddaab17ea
Merge pull request #63562 from Rindbee/better-scroll-conditions
Use more reasonable scrollable conditions in `ScrollContainer`
2022-11-02 14:21:21 +01:00
Rémi Verschelde
87cdc2ea60
Merge pull request #67994 from YeldhamDev/how_suggestive
Stop centering clicked suggestions in the autocomplete popup
2022-11-02 14:15:32 +01:00
Alfred Reinold Baudisch
fcff978763 Shortcut and Bind to Remove Secondary Carets
Adds the bind `ui_text_remove_secondary_carets` to TextEdit, with ESC as the default shortcut.

When the bind is performed, if the TextEdit has multiple carets, `remove_secondary_carets` is called and secondary carets are removed.

This is useful when multiple selects are performed with `add_select_for_next_occurrence` #67644 or when multiple multiple carets are manually added, then it's possible to go back to a single caret with a shortcut.

Closes #67991
2022-10-31 17:44:47 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Rémi Verschelde
33c7c8020a
Merge pull request #67489 from timothyqiu/auto-select-all
Allow selecting SpinBox & LineEdit text when focus enters
2022-10-31 11:55:06 +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
Rémi Verschelde
8b1a42cd47
Merge pull request #67888 from KoBeWi/overridead
Remove `override_selected_font_color` property
2022-10-31 10:59:07 +01:00
Rémi Verschelde
420eb1aa34
Merge pull request #67445 from Zylann/rename_queue_delete
Rename queue_delete => queue_free
2022-10-31 10:51:18 +01:00
Rémi Verschelde
d831ba1d6f
Merge pull request #67534 from KoBeWi/more_OK_in_OKHSL
Improve ColorPicker sliders in OKHSL mode
2022-10-31 10:37:27 +01:00
Rémi Verschelde
68623c75b3
Merge pull request #67496 from Paulb23/text-edit-crashes
Fix TextEdit action and CodeEdit completion crash
2022-10-31 10:32:41 +01:00
Rémi Verschelde
273410ba5a
Merge pull request #67139 from PucklaMotzer09/insert_caret_at_carets
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-31 10:32:07 +01:00
Rémi Verschelde
996f7e5142
Merge pull request #66352 from arkology/progressbar_atlastexture_radial
Support AtlasTexture in radial modes of TextureProgressBar
2022-10-31 10:31:07 +01:00
Haoyu Qiu
3aed3edc06 Allow selecting SpinBox & LineEdit text when focus enters 2022-10-29 09:58:42 +08:00
Michael Alexsander
4b6e6c6758 Stop centering clicked suggestions in the autocomplete popup 2022-10-28 20:22:28 -03:00
Clay John
0486810697
Merge pull request #67644 from alfredbaudisch/add-selection-next-occurrence
Add Selection and Caret for Next Occurrence of Selection
2022-10-27 17:21:49 -07:00
Michael Alexsander
fb8588e68e Fix problems with tab_changed signal when removing multiple tabs at once 2022-10-27 03:16:01 -03:00
kobewi
c7eb814ede Remove override_selected_font_color property 2022-10-26 12:59:18 +02:00
Marc Gilleron
7543a5e014 Rename queue_delete => queue_free
# Conflicts:
#	editor/plugins/tiles/tiles_editor_plugin.cpp
2022-10-24 22:07:02 +01:00
Clay John
4134f2a464
Merge pull request #67566 from Sauermann/fix-code-simplifications
Code simplifications
2022-10-23 17:02:04 -07:00
Teggy
2b08675f37 Add alignment options to flow container 2022-10-23 13:40:17 +02:00
Alfred Reinold Baudisch
7d15ecc3af Add Selection and Caret for Next Occurrence of Selection
Adds the bind `add_selection_for_next_occurrence` to TextEdit, with CTRL+D as the default shortcut.

When the bind is performed, ff a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence.

If no selection is currently active with the last caret in text fields, selects the word currently under the caret.

The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets. The viewport is adjusted to the latest newly added caret.

The bind and the behaviour is similar to VS Code's "Add Selection to Next Find Match" and JetBrains' "Add Selection for Next Occurrence". It takes advantage of the multi-caret API.

The default shortcut for `select_word_under_caret` has been changed to ALT+G, in order to give priority to CTRL+D for `add_selection_for_next_occurrence` to better align with popular IDEs and editors.
2022-10-21 08:26:53 +02:00
George L. Albany
d846dd6e91
Make BaseButton Shortcut feedback togglable 2022-10-20 02:02:12 -04:00
Max Hilbrunner
d148613bb1
Merge pull request #66279 from aaronfranke/control-min-size
Revert `custom_minimum_size` type back to `Vector2` instead of `Vector2i`
2022-10-19 22:40:52 +02:00
kobewi
d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
kobewi
b42c1f82fc Improve ColorPicker sliders in OKHSL mode 2022-10-18 23:59:55 +02:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Markus Sauermann
b8031bb7d6 Code simplifications
1. Viewport::get_visible_rect().position is always zero.
So Control::get_window_rect is identical to Control::get_global_rect.
Remove Control::get_window_rect since it is not used in the source code.

2. sqrt(a * a) = abs(a) for doubles

3. Simplify affine_inverse combination

4. Simplify calculation in shaders
2022-10-18 12:47:40 +02:00
PucklaMotzer09
e5354cacd0 Add Caret Insert Below and Above shortcuts to TextEdit 2022-10-18 10:38:53 +02:00
Rindbee
42073fc2bb Use more reasonable scrollable conditions in ScrollContainer
The visibility of the `ScrollBar` was used as a condition for judging whether it should scroll.
**Visible** and **scrollable** are currently not the same in some cases (`SCROLL_MODE_SHOW_NEVER`).
This makes `SCROLL_MODE_SHOW_NEVER` not working properly.

This patch will make `SCROLL_MODE_SHOW_NEVER` available, so that the external `SrollBar` can
share the internal `ScrollBar`'s data, we can achieve the purpose of replacing the internal
`ScrollBar` with a custom external one.
2022-10-18 16:32:39 +08:00
arkology
825f5671f1 Support AtlasTexture in radial modes of TextureProgressBar 2022-10-17 20:44:25 +03:00
Paulb23
4bfb1d953c Fix undo redo not adjusting TextEdit viewport to caret 2022-10-16 19:30:03 +01:00
Paulb23
b5dc8e24be Fix crash in code completion when using an invalid / null font 2022-10-16 16:47:27 +01:00
Paulb23
76005e5ff7 Forcibly end current TextEdit action on undo redo 2022-10-16 16:28:22 +01:00
bruvzg
4b1937c73f Abort LineEdit shaping if no font is set to avoid unnecessary error messages. 2022-10-14 12:57:42 +03:00
Rémi Verschelde
f32f5b70d8 Merge pull request #67348 from Mickeon/salvage-a-dear-comment
Comment not to remove `data` structs in some Nodes
2022-10-13 18:40:58 +02:00
Micky
de9e08da76 Comment not to remove data structs in some Nodes 2022-10-13 15:52:35 +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
Rémi Verschelde
17db8be33c Merge pull request #66357 from EricEzaM/shortcut-context-on-node
Move Shortcut Context to control and fix `shortcut_input` with `shortcut_context`
2022-10-13 15:24:30 +02:00
Eric M
a3ed9e6f2c Move Shortcut Context to Control and ensure that shortcut_input adheres to contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context. 2022-10-13 21:07:19 +10:00
MladoniSzabi
3550354fd3 fixed holding alt while zooming zooms in by 2 increments. 2022-10-13 11:38:25 +01:00
Rémi Verschelde
fad0327503 Merge pull request #66953 from Sauermann/fix-top-level-connect-error
Fix Control node not disconnecting from signal
2022-10-13 09:04:25 +02:00
Rémi Verschelde
15b68f7601 Merge pull request #67232 from bruvzg/popup_edit
Improve Popup / Window behavior in the edited scene tree.
2022-10-12 14:45:14 +02:00
Paulb23
f3eb543e67 Fix select word under caret using caret col instead of line 2022-10-11 20:32:06 +01:00