Commit Graph

162 Commits

Author SHA1 Message Date
Tefatika abd894daf7
Fixed error messages when setting all_tab_in_front of TabContainer
Some signal handlers weren't unregistered when removing the wrapped
child TabBar, which resulted in errors printed when the TabBar was
removed and added again when the flag was updated
2023-04-30 08:17:21 +02:00
Rémi Verschelde b5ddafcab2
Merge pull request #76374 from OverloadedOrama/more-tab-container-signals
Add missing `TabBar` signals to `TabContainer`
2023-04-24 16:48:01 +02:00
Rémi Verschelde dfee04ae2a
Merge pull request #74632 from davthedev/tabs-hover
Add theming support for hovered tabs
2023-04-24 16:42:38 +02:00
Emmanouil Papadeas 0a6a4969dc Add more signals to `TabContainer` that `TabBar` already has 2023-04-23 18:50:35 +03:00
David Giardi 9f1e18e64c Add theming support for hovered tabs
Tabs can now be styled differently when hovered by the mouse pointer.
2023-04-19 01:38:09 +02:00
ShadyChibinko 9d2aecade0 Add Tab Metadata 2023-04-11 12:52:03 -04:00
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