Commit graph

156 commits

Author SHA1 Message Date
Yuri Sizov
1522762dc9 Make icons of scripted and custom classes fit the editor UI
Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
2023-03-31 21:39:02 +02:00
kobewi
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Juan Linietsky
e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +01:00
Juan Linietsky
0e0a6bb39b
Removed unused property hints and Object::get_translatable_strings()
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes #30203.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Michael Alexsander
fb8588e68e Fix problems with tab_changed signal when removing multiple tabs at once 2022-10-27 03:16:01 -03:00
Rindbee
65f97c671c Make the inner TabBar in a TabContainer behave as if it were in a Container 2022-09-18 20:55:13 +08:00
Rindbee
464c374372 Fix minimum size calculation for TabContainer 2022-09-18 06:59:48 +08:00
Yuri Sizov
3b1aa240dc Add a lifecycle method for manual theme item caching to Control 2022-09-01 16:35:36 +03:00
Rémi Verschelde
e27b61d291
Merge pull request #65042 from YuriSizov/editor-docks-tabbar-bg 2022-08-30 18:53:54 +02: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
风青山
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
FireForge
97dfbea6ad Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
Rindbee
c47ac20620 Fix getting outdated tab controls 2022-07-18 20:06:21 +08:00
Nathan Franke
085ec68dfe
repaint tab container when changing tab visibility 2022-06-23 18:20:00 -05:00
kobewi
1dc7bcc83c Cleanup metadata usage 2022-05-06 00:27:10 +02:00
Rindbee
44e32ba75c Fix font_size not working in TabContainer 2022-04-25 23:22:59 +08:00
FireForge
3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
Bastiaan Olij
9b7b9de0e5 Add action map editor for OpenXR 2022-04-04 18:43:29 +10:00
Michael Alexsander
b8ce726dd0 Small fixes for TabContainer 2022-03-31 16:43:09 -03:00
Michael Alexsander
94b8f38de2 Add visual marker when dragging and dropping tabs 2022-03-21 22:16:29 -03:00
Rémi Verschelde
45fa14e1ae
Merge pull request #58850 from YeldhamDev/more_tab_regressions 2022-03-08 14:28:39 +01:00
Paweł Fertyk
5381a27f79 Fix crash with all_tabs_in_front
Fixes #58790.
2022-03-08 00:19:21 +01:00
Michael Alexsander
c0381594c3 Fix regressions with nameless and icon-only tabs 2022-03-06 22:17:35 -03:00
kobewi
b3864db7e0 Change tabs_rearrange_group to property 2022-03-05 21:03:01 +01:00
Michael Alexsander
ebf630441f Fix renaming TabContainer children not updating tab names when outside the tree 2022-03-04 18:26:08 -03:00
Michael Alexsander
a811ebf699 Make TabContainer use TabBar internally 2022-03-03 21:49:58 -03:00
Rémi Verschelde
0f5455230c
Use switch consistently in _notification (scene folder) 2022-02-15 18:44:55 +01:00
Yuri Sizov
107b6f299c Reorganize inspector layout workflow for Control nodes 2022-02-10 20:29:34 +03:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Rémi Verschelde
8eb1d20346
Merge pull request #56206 from KoBeWi/random_call_deferred_to_the_rescue_once_again 2022-01-05 10:57:53 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
kobewi
a7a41a3431 Fix TabContainer not setting layout immediately 2021-12-23 23:47:27 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
kobewi
ea7cc1dea9 Rename minimum_size_changed() method 2021-12-06 14:02:34 +01:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
Rémi Verschelde
9293c76636
Merge pull request #53049 from AnilBK/dont-construct-2 2021-09-25 12:26:08 +02:00
Anilforextra
cdd912c48e Construct values only when necessary. 2021-09-25 14:46:45 +05:45
Michael Alexsander
7ce02b642e Expose TabContainer's tab hidding for scripts 2021-09-24 01:26:59 -03:00
Matthew Newall
02cbf94022 Removed unused Ref<Font> font variables 2021-09-09 19:47:16 +00:00
Gilles Roudière
88c3e3180a
Merge pull request #52050 from nobuyukinyuu/bind-get-tab-idx-at-point-40
Bind TabContainer::get_tab_idx_at_point() to ClassDB
2021-09-07 11:09:35 +02:00
kleonc
3311a5b593 TabContainer Fix drawing current tab when it's disabled 2021-09-01 03:59:45 +02:00
nobuyuki_nyuu
65d83cc99b Bind TabContainer::get_tab_idx_at_point() to ClassDB 2021-08-29 09:10:44 -05:00
kobewi
a913ae8d56 Add support for internal nodes 2021-08-28 02:07:23 +02:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
kleonc
fd483c729f TabContainer: Fix error on removing top-level Control child, Remove _get_tab method 2021-08-04 21:13:10 +02:00
kleonc
a5a4532378 TabContainer Fix moving dropped tab at incorrect child index 2021-08-02 14:15:51 +02:00
Michael Alexsander
94a64d557e Add auto_translate toggle for automatic translation 2021-07-29 18:30:34 -03:00