Rémi Verschelde
dcd74563b6
Merge pull request #65156 from YuriSizov/control-customizable-cache-p1
2022-09-01 19:08:02 +02:00
Hendrik Brucker
ea0472fecf
Refactor BitMap and add tests
...
Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
2022-09-01 18:39:17 +02:00
Rémi Verschelde
027415312e
Merge pull request #65132 from bruvzg/global_menu_shortcuts_context
2022-09-01 17:02:04 +02:00
Yuri Sizov
3b1aa240dc
Add a lifecycle method for manual theme item caching to Control
2022-09-01 16:35:36 +03:00
Yuri Sizov
15fd025f90
Add dumb and manual theme caching systems to Window
2022-09-01 16:05:02 +03:00
Yuri Rubinsky
8191b3c110
Rename `uniform` to `parameter` across the engine
2022-09-01 11:42:57 +03:00
Rémi Verschelde
0a34994720
Merge pull request #65117 from YeldhamDev/menubar_key_fix
...
Fix switching `MenuBar`'s menus with the keys while mouse hovering
2022-09-01 08:46:01 +02:00
Rémi Verschelde
d22f2612f9
Merge pull request #65162 from YuriSizov/editor-gradients-united
...
Unite `GradientEdit` and `GradientEditor` as editor-only widget
2022-09-01 08:30:16 +02:00
bruvzg
b85a4c5d79
[macOS] Handle accelerator and click events of the global menu items separately.
2022-09-01 08:13:56 +03:00
bruvzg
7aad14a4b6
[TextServer] Add support for trimming edge spaces on line break.
2022-09-01 08:11:55 +03:00
Yuri Sizov
93078ea551
Unite GradientEdit and GradientEditor as editor-only widget
2022-08-31 23:45:04 +03:00
Tim Fronsee
e5c183b01e
Fix TextEdit::gutters_width (total gutter width) when adding & removing a gutter by calling TextEdit::_update_gutter_width in TextEdit::add_gutter & TextEdit::remove_gutter
...
Update TextEdit gutters subcase, gutter add and remove to ensure gutter total width is correct
Fix test_code_edit symbol lookup test case to include padding (+2)
2022-08-31 10:01:40 +09:00
Michael Alexsander
9e0de4e2cb
Fix switching `MenuBar`'s menus with the keys while mouse hovering
2022-08-30 20:18:35 -03:00
Rémi Verschelde
e27b61d291
Merge pull request #65042 from YuriSizov/editor-docks-tabbar-bg
2022-08-30 18:53:54 +02:00
Rémi Verschelde
ae349d8227
Merge pull request #64377 from Mickeon/rename-canvas-redraw
...
Rename `CanvasItem.update()` to `queue_redraw()`
2022-08-30 14:47:41 +02:00
Rémi Verschelde
ebe4f8d3a4
Merge pull request #65039 from Mickeon/rename-treeitem-tooltip
2022-08-30 14:05:08 +02:00
Micky
97f8c9b97c
Rename TreeItem's `set_tooltip` to `set_tooltip_text`
...
`set_tooltip` -> `set_tooltip_text`
`get_tooltip` -> `get_tooltip_text`
For consistency:
`get_button_tooltip` -> `get_button_tooltip_text`
And the `tooltip` parameter in `add_button` was renamed to `tooltip_text`
2022-08-30 11:16:23 +02:00
Aaron Franke
10a56981dc
Rename String `plus_file` to `path_join`
2022-08-29 19:38:13 -05:00
Yuri Sizov
8b196be855
Add background to TabContainer's tabbar and editor docks
2022-08-29 23:43:32 +03:00
Micky
e31bb5ffeb
Rename `CanvasItem.update()` to `queue_redraw()`
...
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.
Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.
Just a few comments have also been changed to say "redraw".
In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Rémi Verschelde
e60086f98b
Merge pull request #64119 from YuriSizov/theme-init-database
2022-08-29 14:02:21 +02:00
Rémi Verschelde
fd6453c45e
Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
...
This reverts commit 4b817a565c
.
Fixes #64988 .
Fixes #64997 .
This caused several regressions (#64988 , #64997 ,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605 )
which point at a flaw in the current logic:
- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
`NOTIFCATION_THEME_CHANGED` as introduced in #62845 .
- Some classes use their `THEME_CHANGED` to cache theme items in
member variables (e.g. `style_normal`, etc.), and use those member
variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
notification is now deferred, they end up accessing invalid state and this
can lead to not applying theme properly (e.g. for EditorHelp) or crashing
(e.g. for EditorLog or CodeEdit).
So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?
Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
does arrive for the first time. But that means having a temporary invalid
(and possibly still crashing) state, and doing some computations twice
which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde
223e083d36
Merge pull request #64964 from MewPurPur/reorganize-label-properties
...
Reorganize Label and RichTextLabel properties
2022-08-29 09:52:04 +02:00
Rémi Verschelde
f647292df5
Merge pull request #64960 from YeldhamDev/more_hl_stuff
2022-08-29 08:05:33 +02:00
Rémi Verschelde
34f45d7b28
Merge pull request #64967 from YeldhamDev/pm_up_fix
2022-08-29 07:56:03 +02:00
Rémi Verschelde
93cf259834
Merge pull request #64972 from YeldhamDev/you_too_menubar
2022-08-29 07:55:46 +02:00
Rémi Verschelde
f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
...
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
VolTer
832950d1f2
Reorganized Label and RichTextLabel properties
2022-08-28 10:26:04 +02:00
Michael Alexsander
44c64b912f
Add item auto-highlighting to `MenuBar`
2022-08-28 01:49:22 -03:00
Michael Alexsander
221344b9e2
Fix some corner cases in the `Menu/OptionButton` item auto-highlight
2022-08-28 01:15:03 -03:00
Michael Alexsander
06df59887b
Fix crash when pressing up on an empty `PopupMenu`
2022-08-27 18:13:27 -03:00
Rémi Verschelde
d3db8bbebd
Merge pull request #62846 from AaronRecord/remove_redundant_theme_updates_in_enter_tree
...
Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
2022-08-27 21:56:14 +02:00
Aaron Record
4b817a565c
Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED
2022-08-27 11:52:29 -06:00
Rémi Verschelde
f9998455ce
Merge pull request #63249 from V-Sekai/animation_tree_editor_read_only
...
Add read-only mode to AnimationTreeEditor plugins
2022-08-27 08:14:30 +02:00
Micky
ef5b9a06a9
Rename `hint_tooltip` to `tooltip_text` & setget
...
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`
Updates documentation, too.
2022-08-27 01:35:01 +02:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
...
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Rémi Verschelde
4f60fd0480
Merge pull request #64777 from bruvzg/extend_to_title
...
[macOS] Extend editor contents to the window title bar for better space usage.
2022-08-26 23:03:31 +02:00
Yuri Sizov
6320a0fc18
Add ThemeDB, expose previously static Theme methods
2022-08-26 19:23:05 +03:00
Rémi Verschelde
ecfff5b75e
Revert SplitContainer minimum size splitting changes ( #64676 and #64800 )
...
This reverts commits 185b1a5bd3
and 19ad31b89f
.
The original PR and its fixup still had regressions, so we're going back
to the drawing board to reattempt fixing #43749 .
Fixes #64785 .
Fixes #64851 .
Fixes #64866 .
2022-08-26 15:57:17 +02:00
Micky
59e11934d8
Rename `str2var` to `str_to_var` and similar
...
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.
- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`
- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
c8ef12a03a
Merge pull request #64665 from Mickeon/rename-label-visible
2022-08-26 14:54:37 +02:00
bruvzg
bc4ba6cb78
[macOS] Extend editor contents to the window titlebar for better space usage.
2022-08-26 15:12:43 +03:00
Rémi Verschelde
ff612b6916
Merge pull request #64574 from Begah/fix_transient_window_wrap_mouse
2022-08-26 13:54:23 +02:00
Rémi Verschelde
0c639428dd
Merge pull request #64529 from KoBeWi/suffix_begone
2022-08-26 13:39:14 +02:00
Micky
64bd36ecee
Rename Label & RichTextLabel.`percent_visible` to `visible_ratio`
...
Also updates the documentation of both `visible_characters` and `visible_ratio` to, better describe what they do and improve consistency between the two Classes.
2022-08-26 12:15:57 +02:00
Rémi Verschelde
ac7b5111f5
Merge pull request #64768 from bruvzg/popups_hide_if_visible
2022-08-26 11:59:50 +02:00
Rémi Verschelde
fed1189099
Merge pull request #62771 from bruvzg/line_edit_trim
2022-08-26 11:43:28 +02:00
Aaron Record
74eb2a70bd
Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
2022-08-25 14:50:49 -06:00
SaracenOne
75f1357ced
Add read-only mode to AnimationTreeEditor plugins
2022-08-25 16:29:36 +01:00
MathieuRoux
5ac5c8bc06
Fix warp_mouse for transient windows, smoother mouse positioning when releasing mouse for spinbox
2022-08-25 11:30:49 +02:00
Rémi Verschelde
0a5f5c8558
Merge pull request #64536 from Mickeon/editor-tree-icon-size
...
Account for TreeItem's Cell icon and center the text Popup vertically
2022-08-25 09:56:08 +02:00
Rémi Verschelde
1adcd0327f
Merge pull request #64806 from Zylann/graph_node_protected_validate_property
...
Make GraphNode::_validate_property protected so GraphNode can be inherited
2022-08-25 07:30:42 +02:00
Rémi Verschelde
efedef8eb1
Merge pull request #64837 from YuriSizov/control-disconnect-from-everything-and-free-yourself
...
Disconnect Control from theme resources to avoid issues on destruction
2022-08-25 00:04:17 +02:00
Marc Gilleron
22fcdffd17
Make GraphNode::_validate_property protected so GraphNode can be inherited.
...
It's not about overriding or accessing `_validate_property`,
but since `_validate_property` became a multilevel method,
the GDCLASS macro now tries to access the one from the parent class,
which causes a compiling error if the parent class declares
`_validate_property` as private.
2022-08-24 21:29:32 +01:00
Rémi Verschelde
b7d2ba12c8
Merge pull request #64635 from YeldhamDev/menu_buttons_popup_fix
...
Make `Menu/OptionButton` item auto-highlight behave better
2022-08-24 19:07:25 +02:00
Yuri Sizov
bb5fa91a6b
Disconnect Control from theme resources to avoid issues on destruction
2022-08-24 18:50:04 +03:00
Rémi Verschelde
4698dc67b5
Merge pull request #64082 from KoBeWi/array3k
2022-08-24 16:05:59 +02:00
Yuri Sizov
5d14d08702
Merge pull request #59226 from Rindbee/better-setters-in-gui-controls
...
Improve the setters in gui, return directly if the value does not change.
2022-08-24 17:03:54 +03:00
Yuri Sizov
78f3e4cb6a
Merge pull request #64369 from derammo/derammo_tree_right_click_title
...
Replace Tree control left click on title signal with new signal for either left or right click
2022-08-24 16:16:53 +03:00
derammo
0ba2e999df
implemented right click on Tree control header
2022-08-24 08:10:40 -04:00
kobewi
f7f4873ed0
Replace Array return types with TypedArray 3
2022-08-24 12:53:36 +02:00
Rémi Verschelde
c3a8ec3cbb
Merge pull request #64800 from KoBeWi/split_hax
...
Handle child control size changes in SplitContainer
2022-08-24 09:50:46 +02:00
Rémi Verschelde
854eb58074
Merge pull request #64783 from bruvzg/fix_rtl_min_size
...
Fix RTL min. size not triggering text cache update.
2022-08-24 09:49:00 +02:00
Rémi Verschelde
91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
...
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
kobewi
1abdffe7a0
Replace Array return types with TypedArray 2
2022-08-23 23:21:32 +02:00
kobewi
19ad31b89f
Handle child control size changes in SplitContainer
2022-08-23 20:41:10 +02:00
Rémi Verschelde
bbe8d2b03e
Merge pull request #64767 from bruvzg/meta_click
2022-08-23 18:15:44 +02:00
风青山
e561c68256
Add some codes, returnes directly if the value is not changed.
...
Avoid executing the following value-changed logics if the value does not really change.
2022-08-23 23:25:22 +08:00
bruvzg
f02d45ce0c
Fix RTL min. size not triggering text cache update.
2022-08-23 16:27:45 +03:00
Rémi Verschelde
11506eb24d
Merge pull request #64676 from KoBeWi/split_and_conquer
2022-08-23 10:28:09 +02:00
bruvzg
cd095ab64a
Hide MenuButton / OptionButton popup on click if it's already visible.
2022-08-23 10:38:51 +03:00
bruvzg
80a47ab0f9
[RTL] Improve meta click position.
2022-08-23 09:57:22 +03:00
Rémi Verschelde
62c3e72b6f
Merge pull request #63959 from KoBeWi/typo_arrray
...
Replace Array return types with TypedArray (part 1)
2022-08-23 08:52:13 +02:00
kobewi
8be27dc59e
Replace Array return types with TypedArray
2022-08-22 22:42:36 +02:00
Rémi Verschelde
9744becc39
Merge pull request #63891 from derammo/derammo_tree_cache
2022-08-22 22:41:28 +02:00
Rémi Verschelde
b9ea0e1338
Merge pull request #64218 from Rindbee/fix-button-minimum-size-calculation
2022-08-22 22:40:59 +02:00
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property
2022-08-22 21:39:48 +02:00
Rémi Verschelde
acd8fb7bf0
Merge pull request #64626 from YuriSizov/control-farewell-meta
...
Replace meta properties with regular properties in `Control`
2022-08-22 19:26:32 +02:00
Rémi Verschelde
99548e521d
Merge pull request #64711 from YeldhamDev/itemlist_scroll_fix
2022-08-22 17:37:38 +02:00
Yuri Sizov
1a24c9e14b
Make `_validate_property` a multilevel method
2022-08-22 18:35:11 +03:00
Rémi Verschelde
dabc982393
Merge pull request #64618 from bruvzg/fix_menu_min_size
2022-08-22 17:33:27 +02:00
Micky
9a63792a08
Clamp Label's `percent_visible` properly between 0 and 1.0
...
Also applies to RichTextLabel
2022-08-22 12:03:03 +02:00
Michael Alexsander
e298144a41
Fix `ItemList` selection visual when the scrollbar visibility changes
2022-08-21 22:10:41 -03:00
kobewi
185b1a5bd3
Improve SplitContainer minimum size splitting
2022-08-21 03:30:11 +02:00
bruvzg
8f2083e6c0
Fix MenuBar minimum size adding unnecessary extra spacing after the last item.
2022-08-19 22:04:58 +03:00
Michael Alexsander
1da50698fc
Make `Menu/OptionButton` item auto-highlight behave better
2022-08-19 14:54:53 -03:00
Yuri Sizov
e08feee8a6
Replace meta properties with regular properties in `Control`
2022-08-19 20:52:01 +03:00
bruvzg
2040087898
Fix MenuBar not processing shortcuts.
2022-08-19 16:49:50 +03:00
Micky
550616293a
Account for TreeItem's Cell icon and center the text Popup vertically
2022-08-19 13:21:19 +02:00
Max Hilbrunner
420a8c888e
Merge pull request #63950 from bruvzg/menu_bar3
...
Implement MenuBar control to wrap Popup menus or native menu, use native menu for editor.
2022-08-19 01:24:24 +02:00
Clay John
903a3a641e
Merge pull request #64315 from Daylily-Zeleen/fixed-GraphEdit-signal-argument-type
...
Fixed GraphEdit signal argument type
2022-08-18 14:50:33 -06:00
bruvzg
8c56a7416b
Implement `MenuBar` control to wrap `PopupMenu`s or native menu, use native menu for editor.
2022-08-18 22:25:44 +03:00
kobewi
da0c4221f0
Hide prefix/suffix on SpinBox focus
2022-08-17 13:32:25 +02:00
daylilyzeleen
64e33d9ed1
fixed GraphEdit signal argument type
2022-08-12 20:18:36 +08:00
Rindbee
4a3a15c304
Fix case where `h_separation` might not work in `Button`
...
This patch mainly solves two things:
1. The typo of `h_separation`;
2. Negative values of `h_separation` will be treated as `0` when used, to prevent the button's minimum `width` from being reduced by `h_separation`.
2022-08-12 19:57:08 +08:00
Yuri Sizov
9f88300007
Add dumb theme item cache to Control
2022-08-12 14:36:06 +03:00
Yuri Sizov
f3e849edf4
Merge pull request #64267 from bruvzg/le_secret
...
Change `LineEdit` default secret character from "*" to "•".
2022-08-11 16:28:22 +03:00
kobewi
e06cd2742f
Add missing properties to default theme
2022-08-11 14:15:04 +02:00
bruvzg
93b39fad2f
Change LineEdit secret character from "*" to "•".
2022-08-11 13:55:11 +03:00
Yuri Sizov
1362bc22bd
Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript
2022-08-08 16:36:01 +03:00