Rémi Verschelde
92dfa7901b
Merge pull request #61855 from Calinou/popup-centered-minsize-fix-freeze
...
Fix infinite loop when calling `Control.popup_centered_minsize()`
2022-12-12 13:51:37 +01:00
Yuri Sizov
29cc86fa6c
Copy local theme overrides from Control to Window
2022-12-07 20:50:51 +03:00
kobewi
b65a3a52ac
Display transform properties of contained controls
2022-11-30 15:08:39 +01:00
Hendrik Brucker
e84f45fc93
Move z_index, z_as_relative and y_sort_enabled from Node2D to CanvasItem
2022-11-29 17:11:22 +01:00
Rémi Verschelde
438b2e2d02
Merge pull request #59801 from Sauermann/fix-node2d-viewport-root-order
...
Fix Viewport root order after Node2D raise
2022-11-28 08:21:10 +01:00
bruvzg
3add6dcd89
Add `Control::localize_numeral_system` property to toggle automatic numeral system conversion.
2022-11-17 14:59:56 +02:00
Markus Sauermann
022d24a9ae
Fix Viewport root order after Node2D raise
2022-11-02 21:45:00 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
...
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
...
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Clay John
4134f2a464
Merge pull request #67566 from Sauermann/fix-code-simplifications
...
Code simplifications
2022-10-23 17:02:04 -07:00
Max Hilbrunner
d148613bb1
Merge pull request #66279 from aaronfranke/control-min-size
...
Revert `custom_minimum_size` type back to `Vector2` instead of `Vector2i`
2022-10-19 22:40:52 +02:00
kobewi
d06a8320e5
Simplify GDVIRTUAL_CALL calls
2022-10-19 00:05:48 +02:00
kobewi
e48c5daddf
Unify usage of GLOBAL/EDITOR_GET
2022-10-18 19:01:48 +02:00
Markus Sauermann
b8031bb7d6
Code simplifications
...
1. Viewport::get_visible_rect().position is always zero.
So Control::get_window_rect is identical to Control::get_global_rect.
Remove Control::get_window_rect since it is not used in the source code.
2. sqrt(a * a) = abs(a) for doubles
3. Simplify affine_inverse combination
4. Simplify calculation in shaders
2022-10-18 12:47:40 +02:00
Eric M
a3ed9e6f2c
Move Shortcut Context to Control and ensure that `shortcut_input` adheres to contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context.
2022-10-13 21:07:19 +10:00
Rémi Verschelde
fad0327503
Merge pull request #66953 from Sauermann/fix-top-level-connect-error
...
Fix Control node not disconnecting from signal
2022-10-13 09:04:25 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
2022-10-07 11:32:33 +03:00
Markus Sauermann
c0f0f26615
Fix Control not disconnecting signal
...
If a Control has not parent CanvasItem and is set as top_level, then it does not disconnect from the "size_changed" signal when it leaves the Canvas.
This patch corrects this.
2022-10-05 23:35:44 +02:00
Rémi Verschelde
e3464c8fc8
Merge pull request #58995 from Sauermann/fix-mouse-cursor-change-2
...
Update mouse cursor shape after changes
2022-09-28 20:50:05 +02:00
Aaron Franke
c3970f8fe5
Revert custom_minimum_size type back to Vector2 instead of Vector2i
2022-09-22 19:09:12 -05:00
Marc Gilleron
aed3822a93
Change return type of `get_configuration_warnings` to `PackedStringArray`
2022-09-19 16:43:15 +01:00
Markus Sauermann
52da6f1a44
Update mouse cursor shape after changes
...
This fixes some cases where the mouse cursor shape did not change automatically, but instead required a MouseMove to update.
2022-09-18 17:15:38 +02:00
Michael Alexsander
c4c9e41073
Make `Vector2i` values paired with `EDSCALE` be just `Vector2`
2022-09-08 14:46:32 -03:00
Micky
dd26ecdd31
Rename CONNECT_ONESHOT TO CONNECT_ONE_SHOT
...
For consistency. Every other exposed `one_shot` is spaced out like this.
2022-09-06 19:00:33 +02:00
Rémi Verschelde
597bc949a4
Merge pull request #65250 from YuriSizov/theme-owner-rises
2022-09-02 23:20:49 +02:00
Yuri Sizov
8b128081e8
Un-defer the initial theme changed notification
...
Co-authored-by: Rindbee <idleman@yeah.net>
2022-09-02 23:44:23 +03:00
Yuri Sizov
ddc55ef746
Add ThemeOwner type for managing theme propagation and lookup
2022-09-02 23:44:23 +03:00
Hugo Locurcio
f7292dbeb3
Rename `or_lesser` range property hint to `or_less`
...
"less" should be used for quantity, rather than "lesser".
Existing scripts that use `or_lesser` in `_get_property_list()`
will need to be updated to account for this change.
2022-09-02 19:08:20 +02:00
Yuri Sizov
3b1aa240dc
Add a lifecycle method for manual theme item caching to Control
2022-09-01 16:35:36 +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
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
Yuri Sizov
6320a0fc18
Add ThemeDB, expose previously static Theme methods
2022-08-26 19:23:05 +03:00
Aaron Record
74eb2a70bd
Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
2022-08-25 14:50:49 -06:00
Yuri Sizov
bb5fa91a6b
Disconnect Control from theme resources to avoid issues on destruction
2022-08-24 18:50:04 +03: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
kobewi
8be27dc59e
Replace Array return types with TypedArray
2022-08-22 22:42:36 +02:00
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property
2022-08-22 21:39:48 +02:00
Yuri Sizov
1a24c9e14b
Make `_validate_property` a multilevel method
2022-08-22 18:35:11 +03:00
Yuri Sizov
e08feee8a6
Replace meta properties with regular properties in `Control`
2022-08-19 20:52:01 +03:00
Yuri Sizov
9f88300007
Add dumb theme item cache to Control
2022-08-12 14:36:06 +03:00
Juan Linietsky
d4433ae6d3
Remove Signal connect binds
...
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Yuri Sizov
6ca95003a9
Reorganize code of control.cpp for better maintainability
2022-07-26 23:03:49 +03:00
Nathan Franke
f3d43a384d
simplify alignment preset, fixing icon for full rect
2022-07-20 12:18:33 -05:00
FireForge
97dfbea6ad
Rename Control PRESET_WIDE to PRESET_FULL_RECT
2022-07-18 20:08:11 -05:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources.
2022-07-06 14:12:36 +03:00
kobewi
8d62b736b2
Fix find_next_valid_focus() freeze
2022-07-01 00:25:10 +02:00
kobewi
d9ede52ded
Fix find_next_valid_focus() freeze
2022-06-30 16:22:40 +02:00
Rémi Verschelde
82a56e5c42
Merge pull request #61587 from YuriSizov/control-fix-theme-owner-toplevel
...
Fix theme propagation for children of top level controls and windows
2022-06-27 12:03:36 +02:00
Pierre-Thomas Meisels
5ad1a1b5e7
enhancement: rename exposed property Control::minimum_size to Control::custom_minimum_size
2022-06-23 18:06:10 +02:00