Commit graph

2898 commits

Author SHA1 Message Date
kleonc a4afdd4a77 RichTextLabel::add_image Fail if passed image has no area 2021-02-14 16:09:55 +01:00
Rémi Verschelde cdfd3ffe15
Merge pull request #44747 from bruvzg/missing_outlines
[CTL] Add missing theme properties for outlines, fix underline scaling, and RTL cell padding.
2021-02-14 13:49:14 +01:00
bruvzg 1f60ac1e08
[CTL] Fix RichTextLabel cell horizontal padding. 2021-02-14 14:11:49 +02:00
bruvzg d78336c65e
[CTL] Add missing font outline drawing routines and theme constants. 2021-02-14 14:11:44 +02:00
Rémi Verschelde 6fb1ed2bca
Merge pull request #45942 from YeldhamDev/label_height_empty
Keep Label's min height when empty
2021-02-14 13:10:54 +01:00
Rémi Verschelde 7128f09a5d
Merge pull request #45858 from nekomatata/text-edit-style-content-margins
TextEdit respects content margin from StyleBox
2021-02-13 17:41:53 +01:00
Rémi Verschelde 48e7cced9f
Merge pull request #45881 from nekomatata/textedit-wrap-autoscroll
Fix TextEdit autoscroll with wrapped lines
2021-02-13 17:41:20 +01:00
Michael Alexsander 85dc55a82c Keep Label's min height when empty 2021-02-12 21:13:49 -03:00
PouleyKetchoupp 121030940c 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.
2021-02-12 13:44:46 -07:00
PouleyKetchoupp 100fc26f39 TextEdit respects content margin from StyleBox
Now TextEdit adjusts x & y offset according to the corresponding
StyleBox when in normal or read-only mode.

In order to handle bottom content margin, wrapped lines that are entirely outside the stylebox content area are not drawn.
2021-02-12 13:22:06 -07:00
reduz 28537d8c84 Fix LineEdit minimum width
-Changed theme setting name to make more sense of what it does
-Reduced amount of minimum characters, so minimum size is smaller.
2021-02-12 17:04:38 +01:00
bruvzg 6c9e608a34
Use get_char_size(' ') to calculate space width. 2021-02-12 15:06:50 +02:00
Rémi Verschelde 604188c411
Merge pull request #45870 from gongpha/graphedit-connection-update
Update GraphEdit when GraphNode's slot is updated
2021-02-11 13:11:50 +01:00
reduz 1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Kongfa Waroros fe6c8d48e6 Update GraphEdit when GraphNode's slot is updated 2021-02-11 01:07:54 +07:00
Rafał Mikrut 7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
Rémi Verschelde df9c98e107
Merge pull request #45812 from RandomShaper/keep_selected_visible
Keep selected node visible after filter change
2021-02-09 10:43:21 +01:00
Rémi Verschelde 59924a09e8
Merge pull request #45806 from KoBeWi/forest_of_deselection
Set selected Tree item to null when deselected
2021-02-08 22:22:52 +01:00
Kanabenki 03d4ebf129 Update ColorPicker controls when entering tree 2021-02-08 19:25:50 +01:00
Pedro J. Estébanez 177b804f30 Expose Tree::scroll_to_item() 2021-02-08 02:19:13 +01:00
kobewi ef8ec59f2f Set selected Tree item to null when deselected
Co-authored-by: Brody Eller <wviper3@gmail.com>
2021-02-07 22:12:52 +01:00
Oliver Dick 8d598693fc 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
2021-02-07 00:28:57 +01:00
Rémi Verschelde 69152af45d doc: Don't bind argument names with p_ prefix
This prefix is used in the C++ codebase, not in the scripting API.
2021-02-04 14:45:06 +01:00
Rémi Verschelde 264504d76d
Merge pull request #45110 from fmazan/completion-panel-positioning
Fixed completion and hint panel positioning in TextExit
2021-02-01 20:50:17 +01:00
Rémi Verschelde c4811ab525
Merge pull request #45549 from flyingpimonster/graphnode-icon
GraphNode: Add properties for custom icons
2021-02-01 20:49:19 +01:00
bruvzg c75923498e
Use integer coordinates for the font glyphs rendering. 2021-01-31 20:10:50 +02:00
James Westman 08e1453d7f
GraphNode: Add properties for custom icons
Add properties for the slots' icon textures, so they can be set easily
in the editor.

Fixes #45487.
2021-01-28 21:22:25 -06:00
Volka ae2cf8eb38 Fix unintended SpinBox mouse capture 2021-01-26 21:17:31 -05:00
Rémi Verschelde eda5f4ea31
Merge pull request #44349 from KoBeWi/drop_the_data!
Allow to override drop data in LineEdit
2021-01-26 16:03:07 +01:00
Rémi Verschelde b84729f848
Merge pull request #45220 from Calinou/range-ratio-equal-min-max-no-error
Make Range return 1.0 ratio if minimum and maximum values are equal
2021-01-26 15:24:58 +01:00
Rémi Verschelde bdfc7a6b40
Merge pull request #45369 from naithar/fix/line_edit_clear-4.0
[4.0] [GUI] Fix LineEdit clearing
2021-01-26 12:30:34 +01:00
Sergey Minakov ba6aa76992 [GUI] Enforce virtual keyboard redisplay on clear 2021-01-26 13:17:20 +03:00
Nils Reid 3e94c23fa5 Exposed find_next_valid_focus and find_prev_valid_focus. 2021-01-26 08:19:20 +01:00
Rémi Verschelde 6cba658934
Merge pull request #44194 from madmiraal/fix-font_selected_color
Change themes font_color_selected to font_selected_color
2021-01-26 00:03:40 +01:00
Yuri Sizov 9d9d0f0bc9 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:07 +03:00
Marcel Admiraal 8eb39f4e8b Change themes *_color_* to *_*_color
Changed:
font_color_accel -> font_accelerator_color
font_color_bg -> font_unselected_color
font_color_disabled -> font_disabled_color
font_color_fg -> font_selected_color
font_color_hover -> font_hover_color
font_color_hover_pressed -> font_hover_pressed_color
font_color_pressed -> font_pressed_color
font_color_readonly -> font_readonly_color
font_color_selected -> font_selected_color
font_color_shadow -> font_shadow_color
font_color_uneditable -> font_uneditable_color
icon_color_disabled -> icon_disabled_color
icon_color_hover -> icon_hover_color
icon_color_hover_pressed -> icon_hover_pressed_color
icon_color_normal -> icon_normal_color
icon_color_pressed -> icon_pressed_color

Also includes:
font_outline_modulate -> font_outline_color
tab_fg -> tab_selected
tab_bg -> tab_unselected
2021-01-24 06:28:49 +00:00
bruvzg e4651a44ab
RichTextLabel: adds separate get_total_x_count, get_visible_x_count and scroll_to_x functions for wrapped lines and paragraphs (newlines). 2021-01-18 11:26:55 +02:00
Hugo Locurcio 44204ec32d
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.
2021-01-15 23:14:50 +01:00
Rémi Verschelde 1ffe3ed47a
Merge pull request #33685 from Scony/improve-item-lists-add-item-methods
ItemList's add_(icon_)item method returns id of added item
2021-01-15 16:24:20 +01:00
Rémi Verschelde 86e2d4c593
Merge pull request #45196 from Paulb23/text_edit_draw_behind_gutter
Fix TextEdit drawing Caret and icons out of bounds
2021-01-15 16:08:45 +01:00
Rémi Verschelde 274db4aa64
Merge pull request #45149 from pycbouh/ge-disconnect-crash
Prevent signal disconnection attempts on invalid references
2021-01-15 12:48:56 +01:00
Rémi Verschelde 64ba83a096
Merge pull request #44870 from alexpech12/fix-rich-text-label-set-visible-characters
Keep RichTextLabel visible character properties in sync
2021-01-15 00:59:26 +01:00
Paulb23 7666c1caf3 Fix TextEdit drawing Caret and icons out of bounds 2021-01-14 22:19:57 +00:00
Yuri Sizov 5e8e9fc601 Prevent signal disconnection attempts on invalid references 2021-01-14 15:19:32 +03:00
Alexander Pech 463e2002ab 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.
2021-01-14 21:32:41 +11:00
Rafał Mikrut 56734f44e5 Fix errors when removing non Control node from TabContainer 2021-01-12 10:48:18 +01:00
Filip de9e1e4540 Fixed completion and hint panel positioning in TextExit 2021-01-11 22:05:38 +01:00
Rémi Verschelde 50f7314329
RichTextLabel: Fix build after #35505
Should have rebased before merging.
2021-01-08 09:18:19 +01:00
Rémi Verschelde 9349a5507f
Merge pull request #35505 from dalexeev/rtl_colors
Unified named colors in RichTextLabel
2021-01-08 09:03:55 +01:00
David Kennedy 715cf48f81 Makes script editor not draw non existent spaces.
Fixes #44775 Editor is incorrectly drawing non existent space.
2021-01-05 20:20:41 -03:00