Commit graph

2877 commits

Author SHA1 Message Date
bruvzg 784f869f0f
Fix RichTextLabel content height and scrollbar calculations. 2020-12-21 07:49:27 +02:00
bruvzg 1adea98d07
Use integer text position in scroll container, TextEdit and canvas editor, to ensure sharp text rendering.
Use integer font align/advance with any font scaling, to ensure sharp text rendering.
2020-12-21 07:49:27 +02:00
Rémi Verschelde f7ddcbf446
Merge pull request #44328 from gongpha/tabs-label-incorrect
Refresh TextLine buffer when moving a tab
2020-12-21 00:26:08 +01:00
Rémi Verschelde 153c132a7e
Merge pull request #44300 from KoBeWi/🧹🧹
Move initialization of some classes to headers
2020-12-21 00:24:36 +01:00
Yuri Roubinsky 52e44ed3ef Added GraphEdit properties to control lines thickness and antialiasing 2020-12-18 16:41:45 +03:00
Yuri Sizov f5bcbd8325 FIx visual issues with GraphEdit minimap 2020-12-17 22:59:04 +03:00
Rémi Verschelde c83d1b2526
Merge pull request #43416 from pycbouh/graph-minimap
Add a minimap to the GraphEdit
2020-12-17 17:34:36 +01:00
Rémi Verschelde 3d7b01723b
Merge pull request #44412 from DanielZTing/rename
Rename neighbour in Control to neighbor
2020-12-16 14:16:28 +01:00
Sergey Minakov efeb9e4d08 GUI: use cursor in TextEdit for non selected text. 2020-12-16 05:41:14 +03:00
Daniel Ting aea7fde241 Rename neighbour in Control to neighbor
This keeps things consistent with the rest of Godot, which uses the
American English spelling of Color.
2020-12-15 16:42:21 -06:00
Rémi Verschelde 7e3424e3ab
Merge pull request #44377 from Calinou/rename-textureprogressbar
Rename the TextureProgress node to TextureProgressBar
2020-12-15 13:34:32 +01:00
Hugo Locurcio 57dcc83152
Rename the TextureProgress node to TextureProgressBar
Advantages:

- When searching for "progressbar", you'll see both nodes in the
  search results.
- More consistent with Button/TextureButton.
2020-12-14 21:35:13 +01:00
Marcel Admiraal 8509c8c8fc Rename AcceptDialog get_ok() to get_ok_button()
Also renames:
- AcceptDialog add_cancel() to add_cancel_button()
- ConfirmationDiaglog get_cancel() to get_cancel_button()
2020-12-14 18:43:52 +00:00
bruvzg 62927383ed
[Complex Text Layouts] Add drop-caps support to TextParagraph and RTL. 2020-12-13 22:20:02 +02:00
kobewi a3a31591b5 Allow to override drop data in LineEdit 2020-12-13 20:16:56 +01:00
Rémi Verschelde bbf7bb3838
Merge pull request #42595 from bruvzg/ctl_rich_text
[Complex Text Layouts] Refactor RichTextLabel.
2020-12-13 13:42:00 +01:00
gongpha 0394ff3c99 Refresh TextLine buffer when moving tab 2020-12-13 02:38:53 +07:00
Tomasz Chabora 31cb04fbdd Move initialization of some classes to headers 2020-12-11 18:20:03 +01:00
Yuri Roubinsky 2d4ef1c193 Fixed mouse scrolling in TextEdit's 2020-12-11 12:51:10 +03:00
bruvzg 6b6f101983
[Complex Text Layouts] Refactor RichTextLabel. 2020-12-11 09:48:49 +02:00
Michael Alexsander bb39088201 Allow to circle back in 'PopupMenu' even if the first/last item is non-selectable 2020-12-10 09:32:02 -03:00
Rémi Verschelde 2a325f3888
Merge pull request #44233 from YeldhamDev/popupmenu_circle_back
Re-add circle back scrolling to 'PopupMenu'
2020-12-10 11:16:38 +01:00
Rémi Verschelde 67259d07db
Merge pull request #44070 from YeldhamDev/popupmenu_separator_font_color
Add "font_color_separator" theme property to 'PopupMenu'
2020-12-10 11:13:07 +01:00
Rémi Verschelde 70c435272a
Merge pull request #44124 from volzhs/tabs-in-front
Add option to draw all tabs in front
2020-12-10 07:55:41 +01:00
volzhs 814f9015f8 Add option to draw all tabs in front 2020-12-10 07:47:10 +09:00
Michael Alexsander e8e0abc331 Re-add circle back scrolling to 'PopupMenu' 2020-12-09 13:25:00 -03:00
Rémi Verschelde 114f97ff11
Merge pull request #44128 from KoBeWi/🧹
Cleanup unused engine code
2020-12-09 13:01:50 +01:00
Tomasz Chabora 2c048ea164 Cleanup unused engine code 2020-12-09 12:12:36 +01:00
Rémi Verschelde 9a8e123593
Fix connections to CanvasItem and Tabs signals
Follow-up to #44188 and #44189.
2020-12-09 12:04:02 +01:00
bruvzg 644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Marcel Admiraal a65e609e21 Rename Tabs close and hover signals to tab_closed and tab_hovered 2020-12-08 09:51:06 +00:00
bruvzg 0ef483e9a9
[Complex Text Layouts] Performance optimizations. 2020-12-07 08:53:02 +02:00
bruvzg a41f1c67e5
[Complex Text Layouts] Fix missing ItemList item text buffer init in add_icon_item. 2020-12-06 20:31:00 +02:00
bruvzg c3cc9d82b4
[Complex Text Layouts] Align glyph offsets and advances to the pixel grid. 2020-12-06 20:31:00 +02:00
bruvzg a458e90179
[Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, TextEdit, TextLine and TextParagraph.
Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
2020-12-06 20:30:59 +02:00
Rémi Verschelde 1a001ad964
doc: Sync classref with current source
And fixups:
- Add missing bindings in RenderingServer
- Remove duplicate ArrayMesh enum bindings (they're in Mesh already)
- Remove redundant _unhandled_key_input binding in Control (it's in Node
  already)
2020-12-04 22:28:08 +01:00
Michael Alexsander 383e8919e0 Add "font_color_separator" theme property to 'PopupMenu' 2020-12-03 11:36:03 -03:00
volzhs d89677442b Update page value properly of ScrollContainer 2020-12-01 11:52:37 +09:00
Yuri Sizov 999ce610a2 Add a minimap to the GraphEdit 2020-11-30 16:48:52 +03:00
Rémi Verschelde 72366c1858
Merge pull request #43971 from volzhs/fix-tab-container
Fix TabContainer crashes
2020-11-30 09:41:30 +01:00
FIF15 96fb9eeca4 fix #43695 by revert part of #41576
Note that #42109 already reverted the change of MenuButton,
and actually fixed #43695.
As a result, this commit only reverts the change to LinkButton,
in order to prevent unpredictable consequences.
2020-11-30 12:28:45 +08:00
volzhs f1eab4afbd Fix TabContainer crashes 2020-11-30 11:05:59 +09:00
Eric M 12ded391f5 Exposed shortcut_context property to scripting and added documentation.
I didn't expose this as a property or add documentation in the original PR #42109.
2020-11-30 00:11:40 +10:00
Yuri Roubinsky 4a3588a51a
Merge pull request #43828 from Chaosus/restore_line_antialiasing
Restored antialiased lines by emulation using triangle strips
2020-11-28 11:32:16 +03:00
Rémi Verschelde a09846e015
Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-rework
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-28 09:04:25 +01:00
Yuri Roubinsky 3ec972fc95 Restored antialiased lines by emulation using triangle strips 2020-11-27 20:45:59 +03:00
bruvzg 3be31c4960
[Complex Text Layouts] Refactor TextEdit and CodeEdit controls. 2020-11-26 14:25:50 +02:00
bruvzg d66eb77c9c
[Complex Text Layouts] Refactor Label and LineEdit controls. 2020-11-26 14:25:49 +02:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Rémi Verschelde a8c2cc9028
Merge pull request #43807 from Xrayez/aspect-ratio-container
Add `AspectRatioContainer` class
2020-11-26 12:20:15 +01:00
Eric M 4d10524f7f Removed unused property 'pending_resize' from Control 2020-11-26 15:30:13 +10:00
Andrii Doroshenko (Xrayez) ba68383706 Add AspectRatioContainer class
Co-authored-by: Ugis Brekis <ugis.brekis@productmadness.com>
2020-11-25 15:06:40 +02:00
Rémi Verschelde 8c713fa9bf
Merge pull request #43833 from volzhs/fix-scrollcontainer-bar-max-value
Fix to update scroll bar has correct max value in ScrollContainer
2020-11-25 13:27:36 +01:00
Tomasz Chabora 836b78f329 Update clear button when clicked 2020-11-25 00:42:07 +01:00
volzhs 67c2f2445f Fix to update scroll bar has correct max value in ScrollContainer 2020-11-25 05:30:55 +09:00
Eric M 7941235e06 Add is_valid() check for InputEventKey in CanvasItemEditor. 2020-11-23 21:52:15 +10:00
Eric M efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Eric M 9d7d20a978 Added accept_event() calls for SceneTreeDock and BaseButton 2020-11-23 21:14:25 +10:00
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Danil Alexeev 01d0addf56 Unified named colors in RichTextLabel
Now the BB tag `[color]` uses the color names from the `Color` class.
Also, the use of the `#` symbol in an HTML color code has become optional.
2020-11-17 02:55:36 +03:00
Rémi Verschelde fc70f986b9
Merge pull request #42008 from Calinou/theme-rename-node-type
Rename the `type` parameter to `node_type` in Theme and Control
2020-11-16 13:20:24 +01:00
Rémi Verschelde 94875f5f48
Merge pull request #41851 from EricEzaM/PR/popup-menu-hysteresis
Added hysteresis for popup sub-menus
2020-11-16 09:34:28 +01:00
Sergey Minakov 8894c64e54 GUI: send cursor data from TextEdit 2020-11-15 16:03:21 +03:00
Rémi Verschelde acb7d99fce
Merge pull request #43449 from nekomatata/line_edit_window_pos
Expose LineEdit scroll offset to scripts
2020-11-11 13:18:55 +01:00
PouleyKetchoupp 4775db1600 Expose LineEdit scroll offset to scripts 2020-11-11 10:07:31 +01:00
Eric M c482e8ec85 Added hysteresis for popup sub-menus
This adds a small lag effect when opening submenus which allow the user to move directly to an item on the submenu without worrying about avoiding the autohide regions.
2020-11-08 13:28:23 +10:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Rémi Verschelde 52c1b5fc41
Merge pull request #43283 from Calinou/color-remove-contrasted
Remove `Color.contrasted()` as its behavior is barely useful
2020-11-06 10:17:12 +01:00
Hugo Locurcio 7adb6b91b3
Remove Color.contrasted() as its behavior is barely useful
Returning the most contrasting color isn't a trivial task, as there
are often many possible choices. It's usually best left for the user
to implement using a script.
2020-11-03 04:46:08 -05:00
Rémi Verschelde c5d8dafec4
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.
2020-11-03 09:19:03 +01:00
volzhs 8a588343db Fix crash in TabContainer in case of no content at all 2020-10-29 19:52:21 +09:00
Yuri Roubinsky c3df61a602 Removed redundant line from TextEdit
introduced in https://github.com/godotengine/godot/pull/43026
2020-10-28 12:56:20 +03:00
Rémi Verschelde 60ad64a101
Merge pull request #42766 from volzhs/tab-container
Put unselected tabs back in TabContainer control
2020-10-28 09:51:41 +01:00
Hugo Locurcio c3b246e6af
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.
2020-10-27 14:58:52 +01:00
Devin Curry b9c35af15d ScriptEditor: Fix line number gutter drag select
Fixes issue #42722
2020-10-25 12:13:54 -07:00
Aaron Franke 961ee3a1d7
Rename button group property to button_group 2020-10-24 01:30:18 -04:00
Yuri Roubinsky 4c65dc975c Shows ColorRect in Color constants autocompletion 2020-10-23 19:03:50 +03:00
Rémi Verschelde f0f8864c9c
Merge pull request #42907 from Xrayez/add-ref-rect-border-width
Add `border_width` to `ReferenceRect`
2020-10-22 15:58:12 +02:00
Yuri Roubinsky f2b98b4106 Remove printing of windowpos/screenpos in MenuButton 2020-10-21 09:58:37 +03:00
Andrii Doroshenko (Xrayez) aef00021a9 Add border_width to ReferenceRect
Exposes a hidden parameter behind `CanvasItem.draw_rect()`.
2020-10-20 13:58:50 +03:00
Yuri Roubinsky 4f4287243c Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
Rémi Verschelde 970d0d433b
Merge pull request #42891 from gvaneyck/graph-begin-node-move-timing
Fix emit_signal timing for GraphEdit's begin/end node move
2020-10-20 07:48:06 +02:00
Gabriel Van Eyck fbc095dc78 Fix emit_signal timing for GraphEdit's begin/end node move 2020-10-19 18:25:07 -07:00
Rémi Verschelde ff48a6a3bc
Merge pull request #42874 from dreamsComeTrue/text-edit-bounds-fix
TextEdit - fix valid bounds in 'set_line'.
2020-10-19 22:37:41 +02:00
Andrii Doroshenko (Xrayez) 9c3a33a4e8 Fixup ColorRect and TextureRect renames 2020-10-19 19:34:35 +03:00
reduz ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
Dominik 'dreamsComeTrue' Jasiński 99c8a07919 TextEdit - fix valid bounds in 'set_line'. Fixes #41967 2020-10-17 17:59:15 +02:00
Paulb23 0d0a856ad5 Fixed main gutter not drawing on item toggle 2020-10-13 18:01:59 +01:00
volzhs 9eaa5ffab5 Put unselected tabs back in TabContainer control 2020-10-13 22:05:26 +09:00
FIF15 0e7e25d488 Remove redundant property "enabled_focus_mode"
Fixes #41529.
2020-10-13 10:04:37 +02:00
volzhs cac4fedb2a Respect Tree.set_icon_max_width size for drawing selection box 2020-10-13 10:38:32 +09:00
Duroxxigar 4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
Rémi Verschelde 19f72beebb
Merge pull request #42451 from Duroxxigar/rename-toplevel
Renamed toplevel to be top_level
2020-10-02 10:57:23 +02:00
Rémi Verschelde 12091b39d2
Merge pull request #38743 from arrowinaknee/node-config-warnings
Update all get_configuration_warning() to retrieve warnings from the parent
2020-10-01 14:03:29 +02:00
Duroxxigar b687ace7f9 Renamed toplevel to be top_level 2020-10-01 03:17:33 -04:00
Rémi Verschelde c217498aa6
Merge pull request #41895 from 11thPenguin/master
Fix minor typo, gui_hid -> gui_hide
2020-09-29 10:35:12 +02:00
Rémi Verschelde 77ca3c20d8
Merge pull request #42092 from DashCell/dropping_file_on_parrent_directory_fix
Dropping file on parent directory fixed
2020-09-28 10:36:47 +02:00
Rémi Verschelde 915ac7360a
Merge pull request #42066 from dalexeev/output_copy
Improvement for the Copy button in the Output Log
2020-09-24 15:18:59 +02:00
PouleyKetchoupp 54eaaf456f Fix popup menu item selected when opening the menu
In order to allow selecting items by either holding left click, or click
to open and click again to select, mouse button release was invalidated
based on the amount of mouse motion.

This was causing issues in some scenarios where an item could be
selected while opening the menu if the mouse moved enough between button
press and release.

This case could happen in the language selection of the project manager,
especially on linux, because of the order and timing of the mouse
events on x11.

This change invalidates mouse release based on a timing condition rather
than moved distance to handle any case from the display server properly.
2020-09-18 20:45:59 +02:00
Dashcell 1ac936f035 Dropping file on parrent dirrectory fixed 2020-09-16 14:53:22 -03:00