Commit Graph

70 Commits

Author SHA1 Message Date
Haoyu Qiu 14321b8ed5 Set auto translate mode for drag previews
- Controls
  - `LineEdit`, `TextEdit`: Always disabled since it's dragging user input.
  - `TabBar`: Use the same auto translate mode as the node.
  - `RichTextLabel`: Always disable since auto translation is done
    differently from other controls (selection text you get
    programmatically is always after auto translation).
- Editor
  - Disable drag preview auto translation if the text is user input,
    filename, or class name.
  - Also disabled unexpected auto translation for audio bus effect names.
2024-09-19 19:21:29 +08:00
kleonc d1740e6cbf Clear TabBar tab close button's rect after it's hidden 2024-08-04 11:59:37 +02:00
Yuri Rubinsky af5fc8354b Fix a bunch of orphan StringName errors at ProjectSettings/Editor exit 2024-07-09 19:38:52 +03:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Gilles Roudière 7705265477 Fix PropertyListHelper::_get_property returning a valid value even if an index is outside the array valid indices
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-05-10 10:46:04 +02:00
Mansur Isaev b37ddfc606 Add tab tooltip text 2024-04-23 08:28:48 +04:00
kobewi e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +02:00
A Thousand Ships a56c03d495
Fix error spam when adding tabs to `TabBar` without deselect
`current` was allowed to be `-1` when deselection was disabled, causing
errors in other methods when updating the size.
2024-02-20 23:38:20 +01:00
jsjtxietian b7028e5f94 Tweak property order in the inspector for TabBar 2024-02-18 12:54:51 +08:00
Mounir Tohami fdba051a40 Fix `TabBar` size when theme changes 2024-02-13 18:04:31 +00:00
kit 6e965f6c83 Allow tab deselection 2024-01-29 14:30:34 -05:00
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
kit f6a212837b TabContainer bottom position 2024-01-06 15:31:08 -05:00
Wilson E. Alvarez a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Wilson E. Alvarez 80fb8db31f
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-12-13 11:06:26 -05:00
Rémi Verschelde 17da2c5b53
Merge pull request #83963 from YeldhamDev/try_active_tabs_first
Fix disabled tabs being selected when removing the current one
2023-10-28 12:31:38 +02:00
kit 8985a46bdd TabBar save current tab 2023-10-26 18:32:22 -04:00
Michael Alexsander c3fc87964f
Fix disabled tabs being selected when removing the current one 2023-10-25 16:46:54 -03:00
kit 701c8d8323 Fix tab dragging issues 2023-10-22 13:58:31 -04:00
Wierdox 7b33ad354a Fix phantom tab right button. 2023-10-13 16:34:05 -07:00
Rémi Verschelde 0d034447b7
Merge pull request #81648 from 4d49/fix-tab-metadata
Remove the equality check for `TabBar.set_tab_metadata`
2023-10-02 13:16:23 +02:00
Michael Alexsander decae848a8
Make hovered tabs be drawn with the unselected's width at minimum 2023-09-26 15:08:47 -03:00
Arkadiusz Marcin Kołek 18811ac814 Allow to focus individual tabs in TabBar/TabContainer 2023-09-17 18:49:48 +02:00
Mansur Isaev 4982bec8b7 Removes the equality check for `set_tab_metadata`
Makes the code equivalent to the `Tree.set_metadata` code.

Fix: https://github.com/godotengine/godot/issues/81647
2023-09-14 17:07:14 +04:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
Michael Alexsander 7ffad29df8
Fix delay on tab resizing when (un)hovering tabs 2023-06-27 20:33:13 -03: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
Fredia Huya-Kouadio 7325ffdd46 Make tab's close button responsive to touch taps 2023-04-22 20:32:00 -07: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
Danil Alexeev 1cdf3398a0
Fix `TabBar` not redrawing on locale change 2023-02-15 14:51:31 +03:00
Stanislav Labzyuk 436cd91065 Expose TabBar::clear_tabs to GDScript 2023-01-08 13:52:57 +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 82d94cc5c0 Fix errors when `TabBar` is empty 2022-12-27 08:39:06 -03:00
Markus Sauermann 28af870750 Code simplifications found by cppcheck
They are based on:
- Boolean arithmetic simplifications
- setting variables that are not accessed
- constant variables
2022-11-21 08:43:36 +01:00
bruvzg 6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +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
风青山 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 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
FireForge 4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
Rindbee a3b23f6b67 Reset buttons_visible to false while tabs is empty in TabBar::_update_cache 2022-05-28 12:54:45 +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
Rémi Verschelde f0407ad14d
Merge pull request #59336 from YeldhamDev/where_we_dropping_boys 2022-03-26 23:30:07 +01:00
Michael Alexsander 94b8f38de2 Add visual marker when dragging and dropping tabs 2022-03-21 22:16:29 -03:00
Michael Alexsander e289e864d8 Fix `tabs_rearrange_group` property being exposed as a `bool` instead of a `int` 2022-03-19 13:15:51 -03:00
Michael Alexsander 182e038af5 Replace `TabBar`'s `min_width` with `max_tab_width` and expose it 2022-03-09 01:48:18 -03: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