Commit Graph

58 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
Thaddeus Crews 9e96c7d9b8
Merge pull request #110378 from timothyqiu/rtl-preview
Make text-related nodes translation domain aware
2025-10-16 12:48:05 +07:00
Haoyu Qiu 172c80df67 Make text-related nodes translation domain aware
- Makes `is_layout_rtl()` translation domain aware
- Makes various text-drawing controls translation domain aware
- Makes translation preview use the project's fallback locale when disabled
2025-09-22 09:39:14 +07:00
Michael Alexsander aeb3a45c97
Hide `Control` focus when given via mouse input 2025-09-19 13:43:29 +07:00
Haoyu Qiu 51e8b5947f Fix some menu bar items unresponsive after language change 2025-06-16 09:35:37 +07:00
Michael Alexsander 454e4f817c
Make build profile project detection also set build options 2025-06-03 11:11:33 +07:00
Haoyu Qiu b2d47352d0 Fix MenuBar min size not updating after child rename 2025-05-26 14:37:30 +07:00
Pāvels Nadtočajevs 5688d30439
Remove debug focus rect draws from MenuBar and GraphNode. 2025-04-12 21:05:18 +07:00
Pāvels Nadtočajevs b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +07:00
kobewi bc9d0c7835 Add templated version of ObjectDB::get_instance() 2025-03-27 15:43:23 +07:00
A Thousand Ships 466590d0ec
Use `get_slicec` instead of `get_slice` for single character splitters 2025-03-08 20:36:37 +07:00
Yufeng Ying 73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +07:00
Pāvels Nadtočajevs 9604e98a52 [MenuBar] Use PopupMenu title property as a menu name. 2024-12-20 23:35:07 +07:00
Anish Mishra 9f6c88de89 update MenuBar after child renamed in editor 2024-10-08 20:19:02 +07:00
bruvzg 3da43ebec4
[MenuBar] Make menu start index more consistent. 2024-09-06 13:21:01 +07:00
A Thousand Ships 2d2fb3f2e7
Treat `MenuBar` and `MenuButton` as advanced UI 2024-08-28 14:26:54 +07:00
Rémi Verschelde a105553a1d
Merge pull request #92841 from kleonc/menu-bar-proper-canvas-transform-popup-calculation
Fix `MenuBar` popup placement assuming it's in viewport default canvas
2024-08-19 16:04:54 +07:00
A Thousand Ships 832695eb2c
[Tests] Fix various unit tests on minimal builds 2024-07-18 15:17:28 +07:00
kleonc 8228d647a9 Fix MenuBar popup placement assuming it's in viewport default canvas 2024-06-06 16:46:13 +07:00
bruvzg 5851f1e2dd
[MenuBar] Use NativeMenu RIDs instead of indices to track items. 2024-03-25 10:58:05 +07:00
bruvzg ac7583e449
[NativeMenu] Implement native popup menu support on Windows. 2024-03-13 10:51:38 +07:00
bruvzg da02ca7e75
[NativeMenu] Add checks to avoid unnecessary warnings.
Added by Rémi: Add dummy NativeMenu to DisplayServerHeadless,
fixing crashes when using `--headless`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-03-07 00:23:26 +07:00
bruvzg c65a667924
Move `global_menu_*` methods to a separate `NativeMenu` class. 2024-03-04 23:41:41 +07:00
Rémi Verschelde f5cfc7f203
Merge pull request #86322 from bruvzg/mac_global_index
[MenuBar] Store and use global menu item indices.
2024-02-13 17:23:14 +07:00
Rémi Verschelde 23275074cb
Merge pull request #86304 from OverloadedOrama/fix-menubar-scaling
Fix `MenuBar` and `MenuButton` hover position scaling properly with the scale factor multiplier
2024-01-26 11:42:59 +07:00
Emmanouil Papadeas e864b26e54 Fix `MenuBar` hover position scaling properly with the scale factor multiplier 2024-01-24 15:22:16 +07:00
bruvzg a759d97a51
[MenuBar] Store and use global menu item indices. 2023-12-19 09:57:48 +07:00
bruvzg 0d44b50520
[macOS] Add default Window and Help menus, allow special menu customization. 2023-12-13 23:20:05 +07:00
bruvzg 961e8af8bb
[Menu Bar] Update min. size when items are added/removed/changed. 2023-10-25 22:27:44 +07:00
bruvzg d1aaa914f3
[macOS] Add `about_to_open` and `popup_hide` callback for the global menus, move part of logic to the PopupMenu to allow live menu modification. 2023-10-04 09:49:51 +07:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +07:00
Tomasz Chabora 3dd881b4e4 Add option to allow echo events in menu shortcuts 2023-08-16 16:59:17 +07:00
Markus Sauermann 890fdd56df Code simplifications
CPPcheck found most of them.

no need to assign the variable twice:
- AnimationTrackEditTypeAudio
- SSEffects

variable is assigned in all if-else clauses:
- EditorHelp
- AndroidInputHandler
- MenuBar
- ShaderCompiler

same if clause:
- ItemList

clearing an empty bitfield has no effect:
- Viewport
2023-06-21 22:37:26 +07:00
Markus Sauermann 840e2b14f3 Remove unused variable `PopupMenu::parent_rect`
This private variable is not read anywhere.
Remove it and all places, where it is set.
2023-06-15 12:08:47 +07:00
Ninni Pipping 0c16082e1e Use `get_node_or_null` when null checks are present
Avoids duplicate or unnecessary errors
2023-06-10 13:22:56 +07:00
bruvzg be42ff0ef4
Fix MenuBar item order in RTL layout. 2023-05-29 17:03:49 +07:00
kobewi 8f8178bda6 Fix auto-translations in editor 2023-03-22 23:57:12 +07:00
justchen1369 dbfecdb3b0 Fix exported type for Menubar start_index 2023-03-10 11:42:09 +07:00
Алексей Смирнов a118bc2723 MenuBar add auto-translation of Menu names 2023-01-20 11:34:20 +07: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 +07: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 +07:00
Markus Sauermann c5c40f4f23 Fix hovering-color of MenuBar entries when reentering MenuBar
When reentering MenuBar with the mouse cursor, the hovering-color was
not set, because the previously hovered entry was still referenced in
selected_menu. This PR resets selected_menu on mouse-exit.
2022-12-29 01:59:05 +07:00
Rémi Verschelde 2ffb609658 Merge pull request #66337 from EricEzaM/sprite-frames
Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
2022-10-13 15:24:39 +07: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 +07:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +07:00
Eric M 2eda77c682 Ensure all checks of `is_action` in the editor which are for 'shortcut' use, check the action exactly. 2022-09-24 18:01:02 +07:00
RedMser a12c71fff1 Fix #66062: editing shortcut_context in inspector 2022-09-19 19:13:52 +07:00
Michael Alexsander 9507e91c07 Rename `PopupMenu`'s `set/get_current_index()` to `set/get_focused_item()` 2022-09-06 10:51:14 +07:00
Rémi Verschelde dcd74563b6
Merge pull request #65156 from YuriSizov/control-customizable-cache-p1 2022-09-01 19:08:02 +07:00
Rémi Verschelde 027415312e
Merge pull request #65132 from bruvzg/global_menu_shortcuts_context 2022-09-01 17:02:04 +07:00
Yuri Sizov 3b1aa240dc Add a lifecycle method for manual theme item caching to Control 2022-09-01 16:35:36 +07:00