Commit graph

2508 commits

Author SHA1 Message Date
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
Darenn
3c26de316e Fixed bbcode parsing for built-in RichTextEffects in RichTextLabel
RichTextEffect can now have a bbcode string starting like one of the built-in.
It was impossible before as the built-in would take precedence over the custom effect that has the same bbcode start.

Example : [fade] would take precedence over [fade_in]
(cherry picked from commit b4e3042cba)
2020-05-01 10:57:00 +02:00
John Wigg
ee8b3bef2d Limit undo stack size
The stack size of the undo history of a TextEdit was not limited leading
to potential memory leaks when doing lots of operations on a TextEdit.

This commit adds the option gui/common/text_edit_undo_stack_max_size
to the project settings. The first element of the undo stack is popped
if the stack's size exceeds this value ensuring limited memory usage.

The default stack size setting is 1024.

Fixes #37838.

(cherry picked from commit 4a82390aaf)
2020-05-01 10:56:58 +02:00
Pedro J. Estébanez
07c4dc1b30 Avoid invocation to Object's copy constructor
Needed for the next commit. That's the only place in all the Godot code base
where that's attempted and it's not needed because Objects are not meant to
be copied that way.
2020-04-23 12:44:47 +02:00
asheraryam
93f7e8d8fc Add "node_unselected" signal for GraphEdit 2020-04-16 16:56:58 +03:00
Michael Alexsander
b4429c325a Fix incorrect TabContainer documentation for 'get_tab_control()'
(cherry picked from commit 8f925b1970)
2020-04-16 12:57:22 +02:00
Dominik 'dreamsComeTrue' Jasiński
5fdecebee1 Calculate strike-through position correctly
Fixes: #37637
(cherry picked from commit 06a79f260c)
2020-04-16 12:57:22 +02:00
theludovyc
58fcbc2b06 Remove unused ofs variable
(cherry picked from commit 875c994109)
2020-04-16 12:47:18 +02:00
Guilherme Felipe
ddde3819d6 Fix TextureRect::flip_* when used with atlas texture
Fix #37526

(cherry picked from commit fb2d2dd5d0)
2020-04-16 12:47:18 +02:00
PouleyKetchoupp
18c5ef5473 Add style for highlighted Slider grab area
(cherry picked from commit 4c8173af0f)
2020-04-16 12:47:17 +02:00
Leleat
8da00fbfc7 fixed PopupMenus letterjumping on any InputEvent
(cherry picked from commit 8a5660f3d1)
2020-04-16 11:58:14 +02:00
Zak Grumbles
5d9108c9c6 Fix OptionButton docs godotengine#36803
* item_selected and item_focused docs incorrectly had 'id' as the parameter. Changed to
'index'.
* Fix parameter name in ADD_SIGNAL callin code.

(cherry picked from commit a8de034f78)
2020-04-16 11:45:19 +02:00
Thakee Nathees
324213a6db fix project manager don't consume Enter key #17620
(cherry picked from commit b98153886f)
2020-04-16 11:44:44 +02:00
janglee
e1ca49b4b6 Corrected text selection in color picker
Fixes #35603

(cherry picked from commit 77b70aa79d)
2020-04-16 11:43:35 +02:00
qarmin
57952d562c Fixes leak with drives [3.2] 2020-04-12 14:05:47 +02:00
Eoin O'Neill
c18381119e Correction to RichTextLabel Tabulation
Correct backtrack assignment to prevent excessive tabulation. Worth
noting that tabulation is treated differently in RichTextLabel because
of custom user-asignable tab variable which creates problems with
dynamic fonts specifically.

(cherry picked from commit 2000e110a9)
2020-04-06 18:19:14 +02:00
Gil Arasa Verge
f144ec9e67 Clicking backgrd. dimming of editor popup stops input event propagation
A click on the dimmed background of a popup in the editor should stop the input event from propagating to the background.

This solution reuses the system introduced in commit efc3ffb8, taking advantage of the hide() notifications from the modal where we will set the flag "pass_on_modal_close_click(false)" to stop event handling at the viewport input event handling.
The viewport first hides the modal and after marks the input as handled if the flag mentioned above is set.

Fixes #36341

(cherry picked from commit 35bc88ca34)
2020-03-25 11:38:54 +01:00
nathanwfranke
b95a2306db Fix tab container too large when tabs are hidden
(cherry picked from commit c0a84f747e)
2020-03-25 11:38:54 +01:00
Rémi Verschelde
86ecefa1a2 Fix potential divisions by 0 reported by MSVC
The `TextEdit` one was indeed a potential bug.
The `PCKPacker` one seems to be a false positive, it's already in a
`for` loop that depends on `files.size()`.

(cherry picked from commit ca4e4506db)
2020-03-25 11:38:54 +01:00
Tomasz Chabora
c8318012a8 Make search in RichTextLabel case-insensitive
(cherry picked from commit b3f83ac115)
2020-03-25 11:38:53 +01:00
simpuid
223d0abd7e Remove update condition from LineEdit::update_placeholder_width
Placeholder with length greater than `max_length` are allowed, so there is no reason for those update condition.
It fixes the odd alignment of placeholder when it's length is greater than `max_length`

(cherry picked from commit 43b2f75d64)
2020-03-25 11:38:53 +01:00
Darren Kaste
53c8d8a5fb Use LineEdit secret character width everywhere
(cherry picked from commit c7c47410aa)
2020-03-25 11:38:53 +01:00
Darren Kaste
f657614760 Calculate LineEdit selection with secret character
(cherry picked from commit 395a038c85)
2020-03-25 11:38:53 +01:00
Dominik 'dreamsComeTrue' Jasiński
e590a33d45 Allow single quotes in comments
Fixes: #36638
(cherry picked from commit ab6456d1bc)
2020-03-25 09:45:08 +01:00
Rémi Verschelde
c01e840f03
Merge pull request #36639 from RandomShaper/imvu/improve_drives_ux_3.2
Improve UX of drive letters (3.2)
2020-03-17 16:27:33 +01:00
Pedro J. Estébanez
6105dfdac9 Improve UX of drive letters
Namely, move the drive dropdown to just the left of the path text box and don't include the former
in the latter.

This improves the UX on Windows.

In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its
dropdown is kept at the original location.
2020-03-17 14:48:54 +01:00
Dominik 'dreamsComeTrue' Jasiński
f328ac36d6 Fix: auto brace complete for quoted strings
Fixes #36002

(cherry picked from commit 6a404a88e4)
2020-03-04 09:53:44 +01:00