Michael Alexsander
097c675c34
Fix incorrect submenu icon and accelerator text positions involving margins
2024-04-18 00:13:28 +07:00
Koyper
0881c81c13
Fix non-embedded Windows resizing to match Viewport content scale factor
2024-04-17 09:30:16 +07:00
Michael Alexsander
978ffb39bf
Fix submenus erroneously closing on some occasions
2024-04-13 15:10:19 +07:00
bruvzg
3459aaa9d1
Fix NativeMenu layout direction on macOS, add extra check for Windows menu.
2024-03-15 09:48:54 +07:00
bruvzg
ac7583e449
[NativeMenu] Implement native popup menu support on Windows.
2024-03-13 10:51:38 +07:00
bruvzg
c65a667924
Move `global_menu_*` methods to a separate `NativeMenu` class.
2024-03-04 23:41:41 +07:00
Mounir Tohami
7884d63281
Fix PopupMenu doesn't respect it's ScrollContainer's margins
2024-02-23 15:51:47 +07:00
kobewi
aeec3c1309
Add methods to add submenus without using names
2024-02-22 15:13:53 +07:00
Rémi Verschelde
a246a4b523
Merge pull request #87967 from jsjtxietian/set_item_submenu
...
Fix `set_item_submenu` infinite recursion crash
2024-02-22 14:39:06 +07:00
jsjtxietian
3525972bc7
Fix `set_item_submenu` infinite recursion crash
2024-02-22 12:37:50 +07:00
Rémi Verschelde
8f1915eb90
Revert "Fix selecting popup menu items on mouse release"
2024-02-20 10:05:41 +07:00
Rémi Verschelde
92951b0295
Merge pull request #86952 from ryevdokimov/fix-selecting-popup-menu-items-on-mouse-release
...
Fix selecting popup menu items on mouse release
2024-02-14 10:59:40 +07:00
kobewi
4f29ef82db
Add PropertyListHelper to PopupMenu
2024-02-11 12:09:55 +07:00
A Thousand Ships
15369fdb1d
Remove unnecessary `this->` expressions
2024-01-29 09:59:18 +07:00
mrcdk
c9bdccf7f2
Expose PopupMenu get_item_multistate(), get_item_multistate_max() and set_item_multistate_max()
2024-01-22 20:07:19 +07:00
bruvzg
5a61fecd0e
[macOS] Do not unbind PopupMenu from global menu on `clear` call.
2024-01-16 15:33:14 +07:00
Rémi Verschelde
c1da69d8f2
Merge pull request #86141 from Maran23/popup-hover-height-calc
...
Fix Popup hover and height calculation are off by some pixels
2024-01-15 13:23:42 +07:00
Robert Yevdokimov
06c2cda848
Fix selecting popup menu items on mouse release
2024-01-14 17:45:52 +07:00
Rémi Verschelde
365755fb34
Merge pull request #84946 from DarkMessiah/default-theme-checkbox-disabled-state
...
Use disabled icons for CheckBox in DefaultTheme
2024-01-10 12:03:12 +07:00
Rémi Verschelde
6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
...
Add const references detected by clang-tidy
2024-01-04 14:25:33 +07:00
Rémi Verschelde
0c36bd791d
Merge pull request #82900 from bruvzg/macos_menu_global_shortcuts
...
[PopupMenu] Handle shortcuts with "global" flag directly.
2024-01-03 15:41:04 +07:00
bruvzg
15cdc52658
[PopupMenu] Handle physical_keycode and key_label of shortcuts.
2023-12-30 13:17:46 +07:00
Yuri Sizov
8a9aa30348
Merge pull request #81243 from Sauermann/fix-window-events
...
Fix internal events not being delivered to some Window types
2023-12-19 13:01:00 +07:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy
2023-12-16 13:36:44 +07:00
Marius Hanl
18fedd9c13
Fix Popup hover and height calculation are off by some pixels
...
This was caused by an incorrect calculation of the v_separation where it was not needed
2023-12-14 02:24:25 +07:00
bruvzg
0d44b50520
[macOS] Add default Window and Help menus, allow special menu customization.
2023-12-13 23:20:05 +07:00
Stanislav Labzyuk
ff59496632
Use disabled icons for CheckBox in DefaultTheme
2023-11-19 22:01:53 +07:00
Markus Sauermann
fa02d19fd1
Fix internal events not being delivered to some Window types
...
`AcceptDialog`, `Popup` and `PopupMenu` no longer subscribe to
"window_input" signal, because that is only sent if it is not an
internal signal.
Instead they receive events in `_input_from_window`. They ensure that
the event is also propagated to their super-function, just like
previously the signals would be treated.
2023-11-14 20:29:17 +07:00
Yuri Sizov
edcad2ea88
Allow auto-generated node names in `PopupMenu::add_submenu_item`
2023-11-09 17:12:41 +07:00
jsjtxietian
137b25cf53
Fix `activate_item_by_event` infinite recursion crash
2023-11-01 10:29:59 +07:00
A Thousand Ships
f721b34b4e
Ensure input event is valid in `PopupMenu::activate_item_by_event`
2023-10-25 17:45:01 +07:00
Yuri Sizov
215e036600
Add bulk change guards to successive theme overrides in Editor and GUI
2023-10-19 18:14:14 +07:00
Yuri Sizov
ccb989569d
Fix incorrect offset of `PopupMenu` separator icons
2023-10-17 20:38:35 +07:00
Rémi Verschelde
c1fed53943
Merge pull request #80271 from Ymanawat/optionmenu-scroll-test
...
Fix scrolling on keyboard/controller input
2023-10-09 15:30:57 +07:00
bruvzg
f93e254b58
[PopupMenu] Handle shortcuts with "global" flag directly.
2023-10-06 11:16:41 +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
kobewi
df24882f9a
Free submenu children when clearing PopupMenu
2023-09-25 16:45:41 +07:00
PrecisionRender
76fad10978
Expose `PopupMenu` `activate_item_by_event` method
2023-09-15 10:27:49 +07:00
Yuri Sizov
fe000277ea
Bind remaining theme properties to their respective classes
...
This adds binds for GraphEdit/GraphElement/GraphNode, which were
skipped before due to a rework. This also adds binds for Window,
which was skipped before due to a complicated code organization.
Also adds theme cache entries/direct cache access to a few places
that previously missed it. Some theme properties are now exposed
to other classes via friendships or public getters for convenience.
This removes all string-based theme access from scene/ classes.
2023-09-13 19:31:35 +07:00
Rémi Verschelde
013bbd1a1e
Merge pull request #81477 from timothyqiu/aligned
...
Fix submenu alignment with parent menu item
2023-09-11 15:38:54 +07:00
Yuri Sizov
2924bfd4d3
Register theme properties with ThemeDB
2023-09-11 13:45:23 +07:00
Haoyu Qiu
e5ad35a95f
Fix submenu alignment with parent menu item
2023-09-09 14:32:21 +07:00
Yogendra Manawat
a16fdb05ae
Fix scrolling popup_menu On keyboard/controller input
2023-08-30 23:31:22 +07:00
Tomasz Chabora
3dd881b4e4
Add option to allow echo events in menu shortcuts
2023-08-16 16:59:17 +07:00
kobewi
de4a3fa151
Unify and streamline connecting to Resource changes
2023-07-17 19:35:57 +07:00
bruvzg
4790da7900
[macOS] Implement optional native file selection dialog support for sandboxed apps.
2023-07-12 22:36:24 +07:00
Yuri Sizov
631d51c46c
Merge pull request #78476 from Sauermann/fix-embedded-safe-area
...
Embedded Popups store their safe_rect in their embedder
2023-07-12 15:09:20 +07:00
Florian Kothmeier
c33748d954
Fix invalid minimum size for translated messages in option button
2023-06-29 15:01:36 +07:00
Markus Sauermann
a12627765f
Embedded Popups store their safe_rect in their embedder
...
Storing it in the DisplayServer didn't make sense in this case,
because the embedded window is unknown to the DisplayServer.
2023-06-20 18:06: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
Rémi Verschelde
f00c971b81
Merge pull request #63168 from Levrault/master
...
Fix: InputEventJoypadMotion should trigger only once on a vslider
2023-06-05 18:04:39 +07:00
Luc-Frédéric Langis
166ca77f20
feat(gamepad): improve gamepad behavior with slider and popup_menu
2023-06-05 10:20:46 +07:00
Yuri Sizov
6a1d3198d1
Merge pull request #76854 from CapitaineCookie/fix-change-type
...
Fix crash when changing node type from PopupMenu to ItemList
2023-06-02 13:03:55 +07:00
Ninni Pipping
44a5b710f5
Unify item indexing in `PopupMenu`
2023-05-24 15:58:50 +07:00
Clement C
999a1fffec
Fix crash when changing node type from PopMenu to ItemList
2023-05-12 23:29:52 +07:00
the-sink
a85eef4367
Add icon_modulate functionality to PopupMenu
2023-05-08 15:25:00 +07: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 +07:00
bruvzg
cebfc02d6f
Revert "Reordering emitted signals in PopupMenu" and fix editor selection issue in the safer way.
2023-02-24 21:17:05 +07:00
Nong Van Tinh
5928d801a9
Reordering emitted signals in PopupMenu
2023-02-17 23:18:56 +07:00
Rémi Verschelde
b7723a01d9
Merge pull request #66745 from EricEzaM/66453-popupmenu-shortcut-shape-fix
...
Ensure PopupMenu item is shaped when the shortcut is set.
2023-02-13 09:29:41 +07:00
bruvzg
9f42649823
[X11] Fix IME subwindow in the popup not getting input focus.
2023-02-01 11:10:10 +07:00
Yuri Sizov
752402cf35
Clean-up, harmonize, and improve StyleBox API
...
- Make all margin properties follow the same naming convention (their getter and setter too).
- Remove a virtual counterpart of `get_style_margin` from API.
- Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
2023-01-19 20:02:21 +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
Juan Linietsky
2b815df3c1
Use BitField<> in core type masks
...
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +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
bruvzg
02e9134183
Fix menu popup safe rect height no including theme separation.
2022-12-07 08:21:27 +07:00
Markus Sauermann
3b14f0334c
Remove redundant Variant-types initializations
2022-11-14 19:35:19 +07:00
kobewi
d9f066d5fa
Remove duplicate project settings definitions
2022-11-08 01:29:39 +07:00
EricEzaM
61ad9db18c
Ensure PopupMenu item is shaped when the shortcut is set.
2022-10-22 22:05:20 +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
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
af438ae742
Ensure popup menu redraws items when shortcuts update.
2022-09-26 23:21:32 +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
Michael Alexsander
9507e91c07
Rename `PopupMenu`'s `set/get_current_index()` to `set/get_focused_item()`
2022-09-06 10:51:14 +07:00
Jonathan Nicholl
15d057c521
Add `is_zero_approx` methods to `Vector2`, `3`, and `4`
2022-09-02 00:29:50 +07:00
Yuri Sizov
15fd025f90
Add dumb and manual theme caching systems to Window
2022-09-01 16:05:02 +07: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 +07:00
Rémi Verschelde
f647292df5
Merge pull request #64960 from YeldhamDev/more_hl_stuff
2022-08-29 08:05:33 +07:00
Michael Alexsander
221344b9e2
Fix some corner cases in the `Menu/OptionButton` item auto-highlight
2022-08-28 01:15:03 +07:00
Michael Alexsander
06df59887b
Fix crash when pressing up on an empty `PopupMenu`
2022-08-27 18:13:27 +07: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 +07:00
bruvzg
8c56a7416b
Implement `MenuBar` control to wrap `PopupMenu`s or native menu, use native menu for editor.
2022-08-18 22:25:44 +07:00
kobewi
e06cd2742f
Add missing properties to default theme
2022-08-11 14:15:04 +07:00
FireForge
97dfbea6ad
Rename Control PRESET_WIDE to PRESET_FULL_RECT
2022-07-18 20:08:11 +07:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources.
2022-07-06 14:12:36 +07:00
FireForge
f85eb4164a
Expose PopupMenu set/get_item_horizontal_offset()
...
- Renames setter from set_item_h_offset()
- Adds getter
2022-06-15 02:08:44 +07:00
bruvzg
f7269fe878
Single-window mode popups and edited scene windows fixes.
...
Fix single-window mode popup not closing when OptionBox is clicked.
Fix single-window mode submenus closing when parent menu item, that was used to open it is clicked (using same safe-area logic as platform specific code).
Disallow windows that are part of an edited scene from being set as exclusive or popup to prevent it from locking up the editor.
2022-06-13 09:56:08 +07:00
FireForge
4678736a39
Add suffixes to all nodes and resources
2022-06-11 09:41:05 +07:00
Rémi Verschelde
9101c5b499
Merge pull request #52624 from e8newallm/52577
...
Corrected ordering of Left/Top/Right/Bottom properties
2022-04-28 17:57:02 +07: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 +07:00
Michael Alexsander
bab2f3c021
Add `font_separator` and related properties to `PopupMenu`
2022-04-13 23:46:35 +07:00
Michael Alexsander
59c3d4e17f
Fix and tweak labeled separator in `PopupMenu`
2022-04-13 17:13:29 +07:00
bruvzg
8b0761d1fd
Fix sub-menu keyboard navigation.
2022-04-13 09:58:38 +07:00
风青山
f789c17690
Fix text buf does not clear when calling the method set_item_text in PopupMenu
2022-03-15 21:49:00 +07:00
kobewi
42078dec9f
Allow negative indexes in ItemList and PopupMenu
2022-03-12 01:14:03 +07:00
kobewi
7d44bb8f06
Remove set_as_minsize()
2022-03-06 00:57:42 +07:00
bruvzg
74ff5921d6
Improve popup window handling.
...
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +07:00
Rémi Verschelde
0f5455230c
Use `switch` consistently in `_notification` (`scene` folder)
2022-02-15 18:44:55 +07:00
Hendrik Brucker
b396fd4eef
Improve compilation speed (forward declarations/includes cleanup)
2022-02-12 02:46:22 +07:00