Commit Graph

295 Commits

Author SHA1 Message Date
fd98c963ba [Editor] Change global menu icons theme independently of editor theme. 2025-03-07 08:59:52 +02:00
315cc5e437 Fix wrong viewport scaling at intermediate resolutions
Fixes viewport scale being wrong at resolutions that are not
integer multiples of content_scale_factor.

This is done by allowing size_2d_override to be Size2 instead of
Size2i. This change is not propagated to the exposed SubViewport
to keep compatibility for now.
2025-02-21 11:24:38 +01:00
05fcfede1e Fix Floating Game Window Title 2025-01-19 15:45:59 -05:00
8d911b2554 [Window] Expose start_drag and start_resize methods (for both native and embedded windows). 2025-01-07 23:35:14 +02:00
01c6e18963 Merge pull request #100745 from mdelorme/mdelorme/issue_100727
Assign the project manager title to the node instead of DisplayServer
2024-12-30 08:58:23 -06:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
e4e966b0f2 Fix #100727 by giving the project manager title to the node instead of DisplayServer 2024-12-23 19:44:18 +01:00
9f3067ef21 Fix Window size changes ignored on Android 2024-12-22 23:12:54 +05:30
88e6997917 Merge pull request #97745 from scgm0/Fix-blurred-content-of-embedded-windows
Improve blurred content of embedded windows
2024-12-22 00:09:55 +01:00
a7a2a12bfd Merge pull request #100671 from bruvzg/get_menu
[MenuBar] Use PopupMenu title property as a menu name.
2024-12-20 23:57:47 +01:00
a11364d1e6 Merge pull request #99010 from Hilderin/embedding-game-process
Embed game process in editor
2024-12-20 23:56:43 +01:00
9604e98a52 [MenuBar] Use PopupMenu title property as a menu name. 2024-12-20 23:35:07 +02:00
0bc2c269cb Fix blurred content of embedded windows 2024-12-20 22:44:36 +08:00
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
0eff41d045 Fix displaying of embedded Window
Fix Rect of texture to take window and stretch transform into account.

There is no need for `viewport_attach_to_screen` for embedded windows,
since their display is handled via `Viewport::_sub_window_update`.
2024-12-17 08:38:14 +01:00
9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
302da3d9a4 Merge pull request #99669 from syntaxerror247/root_window_issues
Fix root window size bug on `Android`
2024-12-02 15:51:16 +01:00
c699d5bada Fix root window size bug on Android 2024-12-02 19:00:28 +05:30
e0304a7d00 Add helper method to get Window from ID 2024-11-29 21:15:23 +01:00
932b2269f8 Fix missing native file dialog title translation. 2024-11-14 14:48:52 +02:00
7cd850b909 [Debugger] Move quit shortcut configuration to the SceneDebugger 2024-11-07 15:03:17 +01:00
7dbea98c49 Merge pull request #97005 from Repiteo/core/window-corner-style
Core: Add `DisplayServer` flag for sharp corners
2024-10-21 16:39:25 -05:00
f8c4a683d7 Core: Add DisplayServer flag for sharp corners 2024-10-18 11:20:21 -05:00
009446a277 Add System Locale layout direction for Control and Window 2024-10-17 07:52:07 +08:00
60aaa017ff Enable Drag and Drop for SubViewports and Windows
Make Drag and Drop an application-wide operation.
This allows do drop on Controls in other Viewports/Windows.

In order to achieve this, `Viewport::_update_mouse_over` is adjusted to
remember the Control, that the mouse is over (possibly within nested
viewports). This Control is used as a basis for the Drop-operation, which
replaces the previous algorithm, which was only aware of the topmost
Viewport.

Also now all nodes in the SceneTree are notified about the Drag and Drop
operation, with the exception of SubViewports that are not children of
SubViewportContainers.
2024-09-15 01:06:02 +02:00
83d54ab2ad Merge pull request #96708 from bruvzg/lbl3d_os
[Label3D] Fix updating labels in subvieports on oversampling change.
2024-09-12 10:28:52 +02:00
0dde931bc9 StringName: Fix empty hash
+Fixed compat hashes
2024-09-09 13:30:02 -07:00
bdd5117086 [Label3D] Fix updating labels in subvieports on oversampling change. 2024-09-08 15:11:13 +03:00
091212b4f1 Merge pull request #93602 from aaronp64/inspector_latency
Improve Editor Inspector/Theme item lookup performance
2024-08-22 00:10:26 +02:00
7593e55527 Improve Editor Inspector/Theme item lookup performance
Changes to reduce the latency between changing node selection in the editor and seeing the new node reflected in the Inspector tab

- Use Vector instead of List for ThemeOwner::get_theme_type_dependencies and related functions
- Use Vector instead of List for ThemeContext::themes, set_themes(), and get_themes()
- Add ClassDB:get_inheritance_chain_nocheck to get all parent/ancestor classes at once, to avoid repeated ClassDB locking overhead
- Update BIND_THEME_ITEM macros and ThemeDB::update_class_instance_items to use provided StringNames for call to ThemeItemSetter, instead of creating a new StringName in each call

These changes reduce the time taken by EditorInspector::update_tree by around 30-35%
2024-08-20 13:39:40 -04:00
46abbae2b0 Fix Window.wrap_controls does not account for the content_scale_factor 2024-08-19 14:48:43 +02:00
7343dc3a5d Split TranslationServer into its own file 2024-08-15 15:00:47 +08:00
kit
fce60c2b3f Fix update mouse cursor state wrong mouse position 2024-07-31 14:10:40 -04:00
97aa278edb Pass window exclusive and transient properties for subwindow creation
On Windows this allows to avoid having to change the owner of the window
after it has been created, which in rare circumstances may cause the
window to bug out.
2024-07-25 00:27:27 +08:00
18393eb09a [Window] Ignore duplicate mouse enter events. 2024-06-12 22:37:28 +03:00
768fd1eacb [Window] Fix mouse hover state of the main window when mouse enter event was sent before setting callbacks. 2024-06-10 18:43:01 +03:00
864a93fdbf Fix excessive canvas items updates. 2024-06-05 21:01:30 +03:00
9fb9660912 Force canvas item update on oversampling change. 2024-06-03 19:46:49 +03:00
5c433cf693 Update editor Window preview position when resizing window. 2024-05-31 07:52:46 +03:00
c9f249796d Merge pull request #92317 from bruvzg/emb_decorations
Fix `get_position_with_decorations` and `get_size_with_decorations` for embedded windows.
2024-05-30 11:48:02 +02:00
19839d9553 Fix Window position preview in the editor. 2024-05-29 11:56:06 +03:00
64d789aba7 Fix get_position_with_decorations and get_size_with_decorations for embedded windows. 2024-05-24 20:10:36 +03:00
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
308dbb8c63 [Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
c951421c99 Merge pull request #90268 from RandomShaper/wtp_servers
Use WorkerThreadPool for Server threads (enhanced)
2024-04-15 10:12:00 +02:00
4ed51933f9 Fix Window.hide() crash when force_native changed
Moved force_native = p_force_native assignment to after is_visible() check, to prevent value from changing after window is shown.

Fixes #90609
2024-04-13 14:03:29 -04:00
c28f5901c7 Polish interaction between windowing, input and rendering
- Adapt GL make/release API to the current architecture.
- Fix DisplayServer being locked while dispatching input (prevent deadlocks).
2024-04-10 18:47:42 +02:00
945babc619 Prohibit execution of delayed input events by different means
In some cases it can happen, that the order of input events and
window events is not followed, when input buffering or input accumulation
is active.

The display server order `InputEvent` => window-event gets changed to
window-event => `InputEvent` which becomes problematic in certain
situations.

This PR makes sure, that the order is adhered to by flushing input events
before a window event is sent.
Previously this problem was mitigated by discarding these delayed events.
But this solution was problematic in the setting of android input events.
2024-03-27 20:58:15 +01:00
d66539e485 Merge pull request #89673 from bruvzg/f_na_ed
Do not apply `force_native` to the edited scene windows.
2024-03-25 13:16:03 +01:00