Commit graph

2734 commits

Author SHA1 Message Date
Rafał Mikrut 06976c3e84 [3.x] Fix crashes when using _input functions 2021-04-27 16:51:29 +02:00
Lightning_A 827f6739a2 Initialize some graphedit values in the header 2021-04-26 09:22:28 -06:00
Tomasz Chabora 44e84c61a6
Add disabled theme icons for CheckBox
(cherry picked from commit 3a40c268a6)
2021-04-26 13:15:28 +02:00
Johannes a3c67dd3fc
Fix removal of rect_min_size not triggering resize
fixes #46672

(cherry picked from commit c8868fcaab)
2021-04-26 13:07:59 +02:00
ray90514 ea8004052d
Fix LineEdit undo behaves strangely
(cherry picked from commit 7501c7f48a)
2021-04-26 12:20:28 +02:00
Lightning_A 77cf07c013 Make scrollwheel zoom based on mouse position, cherry-picked for 3.x 2021-04-06 09:36:15 -06:00
bruvzg d844e72157
RichTextLabel: On custom effect change, parse bbcode only if it's enabled and not empty.
(cherry picked from commit 9f73abfa9f)
2021-04-05 12:01:51 +02:00
Kevin Smith c081596a55
Make ColorPicker button text and tooltips appear in exported projects
(cherry picked from commit a7d12920f2)
2021-04-05 11:58:03 +02:00
volzhs b4d88cfe20
Fix typo 'previus_selected'
(cherry picked from commit 990c88f24c)
2021-03-29 14:23:43 +02:00
volzhs 3ee4efe1eb
Fix drawing boxselection on GraphEdit
(cherry picked from commit 1bdc14acea)
2021-03-29 14:23:08 +02:00
lupoDharkael 3b0cf34299 Control: Expose pass_on_modal_close_click 2021-03-25 18:29:41 +01:00
jmb462 6c950977a5
Prevent resizing minimap bigger than GraphEdit (Fix #47189)
Minimap size couldn't be resized back after been resized bigger than GraphEdit cause the grabber was out of GraphEdit.
This commit prevents resizing minimap bigger than GraphEdit and fix this issue.

(cherry picked from commit 045f55ec00)
2021-03-20 23:08:46 +01:00
Lightning_A 72c54c10eb Enable zooming graph_edit with scrollwheel, cherry-picked for 3.x 2021-03-19 14:18:46 -06:00
Yuri Roubinsky 70cd4c5958 Fix GraphEdit connects when graph is zoomed/unzoomed, cherry-picked for 3.x 2021-03-19 14:12:23 -06:00
Yuri Roubinsky 3ad676cbbe Fix GraphEdit reconnecting to disconnected port, cherry-picked for 3.x 2021-03-19 14:12:11 -06:00
Yuri Roubinsky 0b7384621e Prevents incorrect connection attempt on port clicking in GraphEdit, cherry-picked for 3.x 2021-03-19 14:11:54 -06:00
Justin Ho 672fdb7af2
Check for null pointer in get_column_width(0)
(cherry picked from commit fa6fd3a2d0)
2021-03-19 10:51:09 +01:00
jmb462 843eb80039
Fix BBCode tables overlap with bottom text
New row height was added only if all the column was full.

(cherry picked from commit 25af026d9e)
2021-03-19 10:49:36 +01:00
Crystal Melting Dot 0eb0e6128c
Fix TabContainer _get_tab_width
Now it translates node name before calculating tab width

(cherry picked from commit 89baf02fb6)
2021-03-17 21:06:09 +01:00
Kongfa Waroros 7646cbbca6
Check if _edit_set_position and _edit_set_rect was used outside an editor
(cherry picked from commit b80406770f)
2021-03-16 11:11:31 +01:00
Pop0p d2a577f7f1
trims_whitespaces_when_creating_folder_windows
When creating a Windows folder via a Godot's dialog, the extra spaces are not removed which causes problems with Windows. We now remove leading and trailing whitespace when creating a dir.

(cherry picked from commit c8538153b0)
2021-03-13 22:25:34 +01:00
Rémi Verschelde eb1698dd2a
Fix Control::_edit_set_state bogus error check
My mistake when cherry-picking #46699 with f8ee8b1b73,
I forgot to amend the cherry-pick to change 'offsets' back to 'margins' for the 3.2
branch.

Fixes #46979.
2021-03-13 21:10:12 +01:00
sps1112 f8ee8b1b73 Fix Control._edit_set_state crash
(cherry picked from commit 05f5a43cad)
2021-03-12 10:11:54 +01:00
Rémi Verschelde b7e06930aa
Revert "Fix flicker in control nodes due to pivot offset" 2021-03-11 11:01:48 +01:00
kobewi 749892c9fc Release mouse when SpinBox leaves scene tree
(cherry picked from commit 83f6c6b360)
2021-03-07 22:51:06 +01:00
kobewi b82d5688b9 Deselect column only if belongs to deselected item
(cherry picked from commit 5cd5722f6a)
2021-03-04 12:20:35 +01:00
Rémi Verschelde 9ee835ac93
Merge pull request #46409 from asheraryam/fix-scale-pivot-jitter
Fix flicker in control nodes due to pivot offset
2021-03-02 16:15:21 +01:00
Yuri Sizov 59dfd084ab Properly hide GraphEdit's minimap 2021-03-01 18:18:05 +03:00
Mateo Kuruk Miccino 74b3021691 LineEdit: Now double click to select a word, and triple click to select all the content 2021-02-28 17:41:11 -03:00
asheraryam 25f35b2c9f Fix jitter in control nodes when using pivot-offset and animating scale
This is based on suggested fix from this comment
https://github.com/godotengine/godot/issues/36087#issuecomment-771593146 -- basically the old rounding workaround is removed, and rounding is now done locally in the scroll_container instead.

Fixes #28804

Co-authored-by: Georg Wacker <contact@georgwacker.com>
2021-02-28 15:30:48 +03:00
Eric M 3b2c43312c Fixed issues with slider focus and scroll input
(cherry picked from commit 707cf278a5)
2021-02-26 15:27:42 +01:00
Rémi Verschelde 96d38d9751 Revert "Warn when setting Control size inside ready()"
This reverts commit a8105d73c7.

We need to improve the logic somewhat to make the warning more specific to
actual problematic scenarios. Will likely be cherry-picked again + fixes
for the next release.

Fixes #46376.
2021-02-25 15:14:32 +01:00
Jummit 0a9190134d expose edit_selected in Tree
(cherry picked from commit 13fb24cb6f)
2021-02-25 15:14:32 +01:00
kleonc 566ad4fd22 Label::set_lines_skipped Fail if passed a negative value
(cherry picked from commit d7bb7cad47)
2021-02-22 10:16:54 +01:00
Kongfa Waroros af5fe70623 Keep Hue value when Saturation or Value is zero
(cherry picked from commit 27749711b2)
2021-02-22 10:15:29 +01:00
Tomasz Chabora a8105d73c7 Warn when setting Control size inside ready()
(cherry picked from commit 84da090a69)
2021-02-22 10:15:00 +01:00
Kongfa Waroros 5ec1eee6b1 Avoid function signals in ColorPicker to access the tree when it isn't in the tree 2021-02-18 16:57:47 +07:00
kobewi 6440b7fcae
Select TreeItem if none is selected
(cherry picked from commit 282639d653)
2021-02-16 14:27:40 +01:00
kleonc e40682c32d
RichTextLabel::add_image Fail if passed image has no area
(cherry picked from commit a4afdd4a77)
2021-02-16 14:27:39 +01:00
PouleyKetchoupp ac9e5d9c60
Fix TextEdit autoscroll with wrapped lines
Index to find the last line wrap index was off by one, which prevented the first wrapped line to trigger autoscroll.

(cherry picked from commit 121030940c)
2021-02-16 14:27:38 +01:00
PouleyKetchoupp 018008ce81 TextEdit respects content margin from StyleBox
Backport from PR #45858 on master.
2021-02-15 10:47:38 -07:00
Kongfa Waroros adb93d7120
Update GraphEdit when GraphNode's slot is updated
(cherry picked from commit fe6c8d48e6)
2021-02-11 13:14:33 +01:00
Filip 9c4f16f4c1 Fixed completion box not showing properly [3.2] 2021-02-10 20:40:00 +01:00
Rémi Verschelde daa0fe101e
Merge pull request #45813 from RandomShaper/keep_selected_visible_3.2
Keep selected node visible after filter change (3.2)
2021-02-09 10:43:37 +01:00
kobewi 2863c6117e
Set selected Tree item to null when deselected
Co-authored-by: Brody Eller <wviper3@gmail.com>
(cherry picked from commit ef8ec59f2f)
2021-02-08 22:36:37 +01:00
Kanabenki dad0d4a8ee
Update ColorPicker controls when entering tree
(cherry picked from commit 03d4ebf129)
2021-02-08 22:36:37 +01:00
Oliver Dick db57f32194
TextEdit: When left mouse is pressed to place the cursor, do not immediately adjust the viewport when cursor_set_line is called, but afterwards on cursor_set_column (effectively when the cursor reached its final position)
Fixes #45770

(cherry picked from commit 8d598693fc)
2021-02-08 22:36:36 +01:00
Pedro J. Estébanez e1054a17b5 Expose Tree::scroll_to_item() 2021-02-08 02:19:23 +01:00
Volka c6824ec09d
Fix unintended SpinBox mouse capture
(cherry picked from commit ae2cf8eb38)
2021-02-02 13:02:42 +01:00
Rémi Verschelde 0b6dd929c6
Merge pull request #45169 from fmazan/3.2-completion-panel-positioning
[3.2] Fixed completion and hint panel positioning in TextExit
2021-02-01 20:50:38 +01:00
HaSa1002 4ff0df702d Expose bookmark, breakpoint, and mark safe functions in TextEdit 2021-01-27 22:41:07 +01:00
kobewi a7a490e650 Fix popup_centered() for scaled popups 2021-01-27 18:12:09 +01:00
kobewi 7ede2f36fe
Allow to override drop data in LineEdit
(cherry picked from commit a3a31591b5)
2021-01-26 17:24:55 +01:00
Hugo Locurcio 76bd7d796b
Make Range return 1.0 ratio if minimum and maximum values are equal
An error message is also no longer printed.
This matches the behavior found in most UI frameworks where having
equal minimum and maximum values is considered acceptable.

This closes #43179.

(cherry picked from commit 44204ec32d)
2021-01-26 17:00:17 +01:00
Nils Reid 349f25429b
Exposed find_next_valid_focus and find_prev_valid_focus.
(cherry picked from commit 3e94c23fa5)
2021-01-26 17:00:16 +01:00
Rémi Verschelde 07be68e904
Merge pull request #45370 from naithar/fix/line_edit_clear
[3.2] [GUI] Fix LineEdit clearing
2021-01-26 12:30:58 +01:00
Sergey Minakov 7b8d6d2413 [GUI] Enforce virtual keyboard redisplay on clear 2021-01-26 13:18:14 +03:00
Yuri Sizov a9552cefa2 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:34 +03:00
Alexander Pech d73281a350
Keep RichTextLabel visible character properties in sync
The RichTextLabel class is inconsistent in how it updates the
visible_characters and percent_visible properties when either is changed.

To keep both properties consistent, update percent_visible when setting the
visible_characters property.
For both properties, when setting one, notify change for the other.

Docs updated for member set_visible_characters on RichTextLabel class.

(cherry picked from commit 463e2002ab)
2021-01-15 16:49:46 +01:00
Rémi Verschelde 258f41c024
Merge pull request #45150 from pycbouh/ge-disconnect-crash-3.2
[3.2] Prevent signal disconnection attempts on invalid references
2021-01-15 12:49:17 +01:00
Yuri Sizov 6b13c8482a Prevent signal disconnection attempts on invalid references 2021-01-14 15:21:12 +03:00
Filip f1d00522f5 Fixed completion and hint panel positioning in TextExit [3.2] 2021-01-13 21:44:05 +01:00
Rémi Verschelde b9c5e2f9eb
doc: Sync classref with current source
And fix copyright headers in new code.
2021-01-13 16:55:27 +01:00
Rafał Mikrut 8f19d50e27
Fix errors when removing non Control node from TabContainer
(cherry picked from commit 56734f44e5)
2021-01-13 16:17:10 +01:00
Rémi Verschelde 49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Andrii Doroshenko (Xrayez) acd9abe507 Add AspectRatioContainer class
Backported from ba68383706.

Co-authored-by: Ugis Brekis <ugis.brekis@productmadness.com>
2021-01-12 16:25:26 +02:00
Rémi Verschelde 5c80c94449
Revert "solved ctrl + alt + special character Issue #6851"
(cherry picked from commit 8b7f582f22)
2021-01-05 21:33:33 +01:00
Yuri Roubinsky adfc646f8c
Added optional id parameter to PopupMenu::add_separator
(cherry picked from commit ca8c794d04)
2020-12-30 09:57:01 +01:00
Yuri Sizov 816fef21f9 Add a minimap to the GraphEdit 2020-12-18 01:31:17 +03:00
Sergey Minakov f1fd0440f3 GUI: use cursor in TextEdit for non selected text. 2020-12-16 05:33:10 +03:00
Sergey Minakov 4c3b84b3d7 GUI: send cursor data from TextEdit 2020-12-16 05:05:38 +03:00
Michael Alexsander 4fe554933c
Allow to circle back in 'PopupMenu' even if the first/last item is non-selectable
(cherry picked from commit bb39088201)
2020-12-10 14:02:06 +01:00
volzhs c904cf612a
Add option to draw all tabs in front
(cherry picked from commit 814f9015f8)
2020-12-10 13:07:49 +01:00
Michael Alexsander 32da9dc1e9
Add "font_color_separator" theme property to 'PopupMenu'
(cherry picked from commit 383e8919e0)
2020-12-10 13:06:15 +01:00
volzhs 1663a9e87c
Update page value properly of ScrollContainer
(cherry picked from commit d89677442b)
2020-12-09 11:22:04 +01:00
Rémi Verschelde f7061fd559
Buttons: Don't use deprecated set_enabled_focus_mode
It's better to use the equivalent, non-deprecated API.
Follow-up to #43974.
2020-11-30 11:16:15 +01:00
Rémi Verschelde 4f30cdfc33
Merge pull request #43972 from volzhs/fix-tab-container-3
Fix TabContainer crashes
2020-11-30 09:41:39 +01:00
FIF15 f07fb4e595 fix #43695 by revert part of #41577
Restore the default focus mode for MenuButton and LinkButton,
since it is different from the default of BaseButton.
2020-11-30 10:47:26 +08:00
volzhs efade4034b Fix no padding between icon and text in TabContainer 2020-11-30 11:36:57 +09:00
volzhs 8e10e33762 Fix TabContainer crashes 2020-11-30 11:02:18 +09:00
Tomasz Chabora 0c50509326
Update clear button when clicked
(cherry picked from commit 836b78f329)
2020-11-26 09:38:47 +01:00
volzhs 8aeeec034d
Fix to update scroll bar has correct max value in ScrollContainer
(cherry picked from commit 67c2f2445f)
2020-11-26 09:38:47 +01:00
Rémi Verschelde 94c31175de
Merge pull request #43152 from Chaosus/color_autocompletion_3.2
[3.2] Shows ColorRect in Color constants autocompletion
2020-11-26 09:32:32 +01:00
PouleyKetchoupp 9b64646bc3
Expose LineEdit scroll offset to scripts
(cherry picked from commit 4775db1600)
2020-11-11 15:44:18 +01:00
Rémi Verschelde 05143ca39a
Tooltips: Improve code clarity and docs
The return type for `_make_custom_tooltip` is clarified as Control, and users
should make sure to return a visible node for proper size calculations.

Moreover in the current master branch, a PopupPanel will be added as parent
to the provided tooltip to make it a sub-window.

Clarifies documentation for `Control._make_custom_tooltip`, and shows how to
use the (until now undocumented) "TooltipPanel" and "TooltipLabel" theme types
to style tooltips.

Fixes #39677.

(cherry picked from commit c5d8dafec4)
2020-11-11 15:30:56 +01:00
volzhs f4d181179c
Put unselected tabs back in TabContainer control
(cherry picked from commits 9eaa5ffab5
and 8a588343db)
2020-11-11 15:30:54 +01:00
Andrii Doroshenko (Xrayez) 921046c822
Add border_width to ReferenceRect
Exposes a hidden parameter behind `CanvasItem.draw_rect()`.

(cherry picked from commit aef00021a9)
2020-10-28 14:05:40 +01:00
Gabriel Van Eyck 7735cdaf8f
Fix emit_signal timing for GraphEdit's begin/end node move
(cherry picked from commit fbc095dc78)
2020-10-28 14:05:40 +01:00
Dominik 'dreamsComeTrue' Jasiński ba00ced445
TextEdit - fix valid bounds in 'set_line'. Fixes #41967
(cherry picked from commit 99c8a07919)
2020-10-28 14:05:39 +01:00
Yuri Roubinsky 374253242d [3.2] Shows ColorRect in Color constants autocompletion 2020-10-28 12:39:41 +03:00
Rémi Verschelde 150f9ce807
Merge pull request #42009 from Calinou/theme-node-type-3.2
Rename the `type` parameter to `node_type` in Theme and Control (3.2)
2020-10-20 15:58:41 +02:00
volzhs 78143ee93e
Respect Tree.set_icon_max_width size for drawing selection box
(cherry picked from commit cac4fedb2a)
2020-10-19 16:10:00 +02:00
Dashcell c43e8d8fbd
Dropping file on parrent dirrectory fixed
(cherry picked from commit 1ac936f035)
2020-10-19 15:14:13 +02:00
Rémi Verschelde 3495cb91d8
Merge pull request #41577 from FIF15/deprecate-redundant-property-enabled-focus-mode
Deprecate Redundant property enabled_focus_mode
2020-10-19 14:15:43 +02:00
FIF15 8311a37ed9 Deprecate Redundant property enabled_focus_mode
of BaseButton
see #41529 for details
this closes #41529
2020-10-16 14:14:04 +08:00
Rémi Verschelde e40b4eeeea
Merge pull request #37226 from arrowinaknee/fix-node-config-warnings
[3.2] Update get_configuration_warning() overrides to retrieve warnings from parent class
2020-10-01 14:04:26 +02:00
Danil Alexeev 44bdd8f16c
Improvement for the Copy button in the Output Log
Now if no text is selected, pressing the Copy button copies the entire text.

(cherry picked from commit fb6eb21afc)
2020-09-29 08:54:45 +02:00
Michael Alexsander 2d848227cf
Add 'get_previous_tab()' to 'Tabs'
(cherry picked from commit 2b319889cb)
2020-09-24 14:43:10 +02:00
HellonLegs 9340385731
LineEdit/TextEdit: solved control + alt issue
(cherry picked from commit f412237f38)
2020-09-24 14:43:08 +02:00
mvl be13df0a08
Fix bug where leading and trailing spaces werent taken into account with center and right allignment.
(cherry picked from commit 4318ad94ac)
2020-09-24 14:43:05 +02:00
Eric M e24b9f0520
Fixed bug where spinbox would not update to it's actual value after non-numeric input
(cherry picked from commit e76e39d5f5)
2020-09-24 12:08:10 +02:00
Rémi Verschelde c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 14:09:51 +02:00
Hugo Locurcio e36587751f
Rename the type parameter to node_type in Theme and Control
This makes it clearer that it expects a node type as a string (such as "Label")
instead of a type like "TYPE_ARRAY". This is backwards-compatible since only
the name of the parameter is changed, not its order.

See https://github.com/godotengine/godot-proposals/issues/1495#issuecomment-691507839
2020-09-12 18:42:45 +02:00
Wilson E. Alvarez 2b7c9d9070
Disconnect item_rect_changed when removing a child of GraphEdit 2020-09-11 17:36:55 -04:00
PouleyKetchoupp 819765130d
Fix RichTextLabel alignment for clickable regions
Fixes #41006 (regression from #39164).

The original alignment fix was limited to PROCESS_DRAW mode, which
caused some discrepancies with PROCESS_POINTER mode.
Now only PROCESS_CACHE is excluded with a condition a few lines above.

(cherry picked from commit b783fa1416)
2020-09-11 11:15:40 +02:00
Marcel Admiraal f26131fca5
Check if old mouse column is still available.
(cherry picked from commit 79802b31a9)
2020-09-08 13:39:32 +02:00
PouleyKetchoupp c21d14fe69
Fix LineEdit not consuming enter events
LineEdit should not return early when processing KEY_ENTER, so it can
consume the event properly.

Regression introduced by mistake while fixing enter events for Android
(PR #40487 - c0b394572f)

(cherry picked from commit 5c63dec36e)
2020-09-08 13:38:58 +02:00
Rémi Verschelde 8a66ea7cb0
Revert "Updated LineEdit to address #41278"
This reverts commit 1b6d116dfb.
2020-09-01 14:01:50 +02:00
Tony-Goat 1b6d116dfb
Updated LineEdit to address #41278
Updated set_max_length() function to actually pull a substring of the current text so it's not all thrown away when the new max length is shorter than the current length.

(cherry picked from commit 71febfd6e2)
2020-08-31 15:53:56 +02:00
Rémi Verschelde a6ef6b10b2 Revert "Fixes the get_visible_line_count() of rich text label"
This reverts commit dc7e9d46e6.
2020-08-17 11:21:36 +02:00
Cheeseness e70b165c61 Skip indentation of empty lines when indenting a selection.
(cherry picked from commit 1f159306ed)
2020-08-17 11:04:36 +02:00
Umang Kalra 330afdd6cb Fix RichTextLabel center alignment bug
Fixes #40207.

(cherry picked from commit cec21ab82c)
2020-08-14 00:32:05 +02:00
Martin Capitanio 71bad8dba6 Add option to disable virtual keyboard for TextEdit
Adding support for disabling virtual keyboard on mobile platforms, in
order to make it consistent with LineEdit.

It allows implementing a custom virtual keyboard.

See: https://github.com/godotengine/godot/pull/41139
2020-08-09 18:22:11 +02:00
Daniel Ting 6f71bc2a06 Evenly distribute stretched Nodes in BoxContainer
Add any leftover fractional pixels to an error accumulator. When the
accumulator is greater or equal to one, add one pixel to the current
Node's size and subtract one from the accumulator.

Closes #36522

(cherry picked from commit 04ea6ec88d)
2020-07-28 00:39:21 +02:00
Rémi Verschelde a2edf04fd2
Merge pull request #40469 from nekomatata/virtual-keyboard-enter-fixes-3.2
[3.2] Fix Return key events in LineEdit & TextEdit on Android
2020-07-26 20:26:02 +02:00
PouleyKetchoupp 930c880fa6 Add option to disable virtual keyboard for LineEdit
Co-authored-by: Alexander Holland <alexander.holland@live.de>
(cherry picked from commit 0aa56e3ab8)
2020-07-24 10:31:57 +02:00
Tomasz Chabora e511e0f16a Prevent infinite loop in Tree incremental search
(cherry picked from commit c0479496fa)
2020-07-24 10:31:57 +02:00
Umang Kalra dc7e9d46e6 Fixes the get_visible_line_count() of rich text label
(cherry picked from commit bd32c273ff)
2020-07-24 10:31:56 +02:00
PouleyKetchoupp c0b394572f Fix Return key events in LineEdit & TextEdit on Android
Depending on the device implementation, editor actions could be
received with different action ids or not at all for multi-line.

Added a parameter to virtual keyboards to properly handle single-line
and multi-line cases in all situations.

Single-line:
Input type set to text without multiline to make sure actions are sent.
IME options are set to DONE action to force action id consistency.

Multi-line:
Input type set to text and multiline to make sure enter triggers new lines.
Actions are disabled by the multiline flag, so '\n' characters are
handled in text changed callbacks.
2020-07-17 18:25:40 +02:00
Maganty Rushyendra e76a9a51df Emit signals for GraphEdit multi-node selection and unselection
Emit `node_selected` and `node_deselected` signals where appropriate
when selecting or unselecting multiple GraphEdit nodes at once.

(cherry picked from commit c1d5c7727c)
2020-07-13 15:12:50 +02:00
ArrowInAKnee e48430b1d4 Make all get_configuration_warning() overrides retrieve warnings from parent 2020-07-13 01:50:02 +03:00
lrgilbert c0db0749f7 Fixed separation of ports on GraphNode
Fixes #32474.

(cherry picked from commit 47c929c972)
2020-07-03 15:34:30 +02:00
PouleyKetchoupp d6b23306c8 Fix RichTextLabel fill alignment regression
Fixes #40068 (regression from #39164) by not applying the line offset
change in the case of fill alignment mode.

(cherry picked from commit 44f88999c7)
2020-07-03 15:34:30 +02:00
Michael Alexsander 32c154d297 Fix Tree's 'scroll_to_item()' not working correctly on some cases
(cherry picked from commit 144a4cc39f)
2020-07-03 13:17:57 +02:00
Mark Kuo 46590fa3b0 VideoPlayer: fix possible race condition
In set_stream() we write to 'playback' while accessing the same object
in _mix_audio() in audio thread. Protect the 'write' part in
set_stream() to avoid possible crash in _mix_audio() function.

(cherry picked from commit e435d57758)
2020-07-03 13:17:57 +02:00
Haoyu Qiu 38509f1a89 Prevent dragging from SceneTree buttons
(cherry picked from commit 45d0799b5b)
2020-07-03 13:17:57 +02:00
Stijn Hinlopen 65155c2855 No longer scroll vertically when scrollbars are unavailable
(cherry picked from commit 5f7499beac)
2020-06-29 10:47:43 +02:00
Pedro J. Estébanez 0f0360702b Handle gone TabContainer popup nicely 2020-06-24 19:31:26 +02:00
PouleyKetchoupp b3af0b2a39 Option in RichTextLabel for height to fit content
(cherry picked from commit ad8081216c)
2020-06-19 16:17:27 +02:00
Andy Maloney 5bbb15418f [3.2][macOS] Command-backspace in line edit
Make command-backspace in line edit work like other macOS applications.

If there is a selection, command-backspace deletes the selection.

If there isn't a selection, command-backspace deletes from the cursor to the beginning of the line edit.

This addresses part of godotengine/godot#23548
2020-06-18 17:42:51 -04:00
Umang Kalra 1d0c39e395 Fixes the stopping of animation effects in bbcode after appending
(cherry picked from commit 88b30a29bf)
2020-06-15 14:34:35 +02:00
Lisandro Lorea cb119e349a Fix TabContainer emitting spurious tab_selected signals when a theme is changed
- The repaint code was moved outside of set_current_tab() and to a "_repaint()" private function
- _on_theme_changed() will now only call _repaint() and update()
This means _on_theme_changed() will do only what it needs (repainting the TabContainer to account for the new theme)

fixes #39498

(cherry picked from commit 5123006f06)
2020-06-15 14:34:35 +02:00
Tomasz Chabora 2f04896b0e Re-enable scroll follow on RichTextLabel clear
(cherry picked from commit 46fd51056a)
2020-06-15 14:34:35 +02:00
Thibault Truffert 24b3bf0637 Make text deletion methods public for LineEdit
(cherry picked from commit 2bb44ea5bd)
2020-06-11 09:42:23 +02:00
Rémi Verschelde 7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Michael Alexsander 2652a2d184 Add generic file icon and its modulation to the 'FileDialog'
(cherry picked from commit 637927f803)
2020-06-10 15:30:52 +02:00
Giuliano Barberi 221051d523 Tree: Calling update in _gui_input less frequently
(cherry picked from commit d443a13244)
2020-06-10 15:30:51 +02:00
Umang Kalra c1f6854ada Fixes the right and center alignment bug of rich text label
(cherry picked from commit b2a32d007d)
2020-06-04 12:09:40 +02:00
Dominik 'dreamsComeTrue' Jasiński d15e9c2126 Allow scroll_to_line when scroll_active is 'false'
Fix #36134

(cherry picked from commit 8f11a91917)
2020-06-04 12:09:39 +02:00
Thakee Nathees 25ed0d4366 colorpicker margin bug fixed
(cherry picked from commit 9d224ac429)
2020-06-04 11:14:16 +02:00
SkyJJ 2197ef0566 Fix Android LineEdit editing bugs
(cherry picked from commit cc473b948f)
2020-05-20 12:07:08 +02:00
Marcus Brummer 4779d289d5 Fixed text editor drawing if smooth scrolling is disabled.
Fixes #38778

(cherry picked from commit b048eb05ad)
2020-05-18 16:40:33 +02:00
smartin015 8cab02ec06 Remove get_local_mouse_position() hack in GraphEdit
(cherry picked from commit 00457c68bc)
2020-05-18 16:40:33 +02:00
etienne.frank 46327d48a2 Fix minimap selection offset
The minimap selection was shifted of 1 line too late.

(cherry picked from commit 72ab355945)
2020-05-13 16:10:12 +02:00
Eduardo Nunes Pereira 55ab98233a Using the common behaviour when use command+shift on text line for osx
* On press left+command+shift or right+command+shift it should behave like shift+home or shift+end and select the text
* Using home and end events as reference

(cherry picked from commit d8f8a3c606)
2020-05-11 11:13:22 +02:00
janglee d16abbdee4 Improved go-to definition (Ctrl + Click)
Co-Authored-By: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
(cherry picked from commit be7a353c70)
2020-05-11 09:33:21 +05:30
Thakee Nathees 1a39b4ea22 method bind TextEdit::set_line() added
(cherry picked from commit b9acf1cedf)
2020-05-07 13:43:43 +02:00
nobuyuki_nyuu 12386a2d80 PopupMenu.get_current_index() bound to ClassDB
(cherry picked from commit 35f30086de)
2020-05-07 13:36:53 +02:00
Stanislav Labzyuk e3712cf689 Bind set_suffix/get_suffix in Tree
(cherry picked from commit ac8814624d)
2020-05-06 23:31:02 +02:00
Eric M b7fbdf4bed Updated editor spin slider to have better behaviour and adjusted control's size_flags_stretch_ratio value range
(cherry picked from commit 915ab50673)
2020-05-06 23:30:28 +02:00