Commit Graph

6134 Commits

Author SHA1 Message Date
Thaddeus Crews b7c452a36d Merge pull request #104614 from kleonc/control_layout_mode_fallback_to_valid_value
Fallback `Control.layout_mode` to valid mode when child of non-container control
2025-04-07 08:43:22 -05:00
Thaddeus Crews cd234eae45 Merge pull request #104984 from KoBeWi/ETH
Fix wrong translation method in FileDialog
2025-04-07 08:43:20 -05:00
Riteo 84d3adcf2f Wayland: Implement native sub-windows
The backend is now mature enough to not explode with multiple windows
but the `DisplayServer` API still cannot meet some guarantees required
by the various Wayland protocols we use. To meet those guarantees this
patch adds three new elements to the DisplayServer API, with relative
handling logic for `Window` and `Popup` nodes:

 - `WINDOW_EVENT_FORCE_CLOSE`, which tells a window to *forcefully*
close itself and ensure a proper cleanup of its references, as Wayland
enforces this behavior;

 - `WINDOW_FLAG_POPUP_WM_HINT`, which explicitly declares a window as a
"popup", as Wayland enforces this distinction and heuristics are not
reliable enough;

 - `FEATURE_SELF_FITTING_WINDOWS`, which signals that the compositor can
fit windows to the screen automatically and that nodes should not do
that themselves.

Given the size of this feature, this patch also includes various
`WaylandThread` reworks and fixes including:

 - Improvements to frame wait logic, with fixes to various stalls and a
configurable (through a `#define`) timeout amount;

 - A proper implementation of `window_can_draw`;

 - Complete overhaul of pointer and tablet handling. Now everything is
always accumulated and handled only on each respective `frame` event.
This makes their logic simpler and more robust.

 - Better handling of pointer leaving and pointer enter/exit event
sending;

 - Keyboard focus tracking;

 - More solid window references using IDs instead of raw pointers as
windows can be deleted at any time;

 - More aggressive messaging to window nodes to enforce rects imposed by
the compositor.
2025-04-04 20:23:25 +02:00
Thaddeus Crews 9bbda47794 Merge pull request #104776 from BrotherShort/TextEdit-VScroll-max-tolerance
Fix TextEdit VScroll max tolerance
2025-04-03 16:50:14 -05:00
kobewi 83ee5e8556 Fix wrong translation method in FileDialog 2025-04-03 20:40:09 +02:00
BrotherShort 1077fdb15a fix TextEdit VScroll max tolerance
newline

Co-Authored-By: Kit Bishop <kitbdev@gmail.com>
2025-04-03 21:22:57 +08:00
Yufeng Ying 7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
Yufeng Ying 4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
Thaddeus Crews d52b84e472 Merge pull request #103993 from aaronfranke/geometry-segment
Directly use segment points in Geometry2D/3D function parameters
2025-04-01 08:01:34 -05:00
Thaddeus Crews 8f6bb119f4 Merge pull request #100602 from KoBeWi/over_100_changes_in_50_random_files_aka_the_best_kind_of_PR
Add templated version of `ObjectDB::get_instance()`
2025-03-31 12:03:47 -05:00
Aaron Franke c1acc839a8 Directly use segment points in Geometry2D/3D function parameters 2025-03-30 16:25:59 -07:00
Thaddeus Crews e471465d39 Merge pull request #104370 from BrotherShort/no-arrow-no-root-offset
Tree: Fix offset relationship lines with Hide Folding
2025-03-30 09:06:02 -05:00
Thaddeus Crews bc5c739ff8 Merge pull request #104708 from Alex2782/tree_cleanup
`Tree`: apply comment style guidelines and remove unused variables.
2025-03-30 09:06:00 -05:00
Thaddeus Crews ba3482926d Merge pull request #104444 from Delsin-Yu/fix-disabled-recursive-behavior-not-applied-on-ready
[GUI] Fix reparenting control does not update recursive mode cache properly
2025-03-29 10:16:35 -05:00
DE YU 04608fae4a [GUI] Fix an issue where setting a control's recursive mode to disabled does not work on ready. 2025-03-29 06:34:11 +08:00
Alexander Hartmann b96e8d5886 Tree: apply comment style guidelines and remove unused variables.
Co-Authored-By: Tomasz Chabora <2223172+KoBeWi@users.noreply.github.com>
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-03-28 18:03:39 +01:00
Rémi Verschelde 1a367f3a68 Merge pull request #104685 from bruvzg/rtl_vpad
[RTL] Improve vertical padding.
2025-03-28 17:30:44 +01:00
Rémi Verschelde 3b90bb56ad Merge pull request #89782 from KoBeWi/stdArrayList
Use initializer list in Arrays
2025-03-28 17:29:40 +01:00
BrotherShort f660cdb7cf Tree: Fix offset relationship lines with Hide Folding 2025-03-28 15:05:24 +01:00
Rémi Verschelde ca1f445403 Merge pull request #104662 from bruvzg/tab_pad_size
[RTL] Fix size/alignment of tables with padded cells.
2025-03-28 14:33:38 +01:00
Rémi Verschelde f4425aecdf Merge pull request #104638 from beicause/fix-ci-regression-test-project
CI: Fix godot regression project test
2025-03-28 14:33:30 +01:00
Rémi Verschelde 0251fc4476 Merge pull request #104399 from scgm0/Improve-Popup-content_scale_factor
Improve Popup `content_scale_factor`
2025-03-28 14:32:58 +01:00
Rémi Verschelde 1116fc7b0f Merge pull request #104201 from BrotherShort/folding-move-to-2nd-col
Fix folding arrow and relationship lines move to 2nd column.
2025-03-28 14:32:35 +01:00
Rémi Verschelde 1f127770fc Merge pull request #103943 from dugramen/scroll-while-dragging
Scroll `EditorInspector` while drag & drop hovering near the edges
2025-03-28 14:32:20 +01:00
kobewi bc9d0c7835 Add templated version of ObjectDB::get_instance() 2025-03-27 15:43:23 +01:00
Lukas Tenbrink dd9dc75a83 Optimize Object::cast_to by assuming no virtual and multiple inheritance, gaining 8x throughput over dynamic_cast.
Add `-Wvirtual-inheritance` to compiler warnings as a sanity check.
2025-03-27 15:39:53 +01:00
Pāvels Nadtočajevs a2919f8127 [RTL] Improve vertical padding. 2025-03-27 08:51:21 +02:00
Pāvels Nadtočajevs 42edbcd748 [RTL] Fix size/alignment of tables with padded cells. 2025-03-26 20:50:59 +02:00
kobewi 75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
dugramen 3c85281610 Scroll inspector while drag hovering near the edge 2025-03-26 12:37:12 -04:00
scgm0 27438a1b9d Improve Popup content_scale_factor 2025-03-26 23:47:40 +08:00
LuoZhihao 4b9650f54e CI: Fix godot regression project test
Fix crash and memory leak in `SpringBoneSimulator3D`
Fix crash in `GraphEdit`
2025-03-26 17:33:18 +08:00
kleonc 065d567116 Fallback Control.layout_mode to valid mode when child of non-container control 2025-03-25 17:08:44 +01:00
Thaddeus Crews fe3aa047c9 Merge pull request #104241 from Macksaur/tree-item-button-drag
Prevent clicking of TreeItem buttons when letting go outside of the button
2025-03-24 15:27:30 -05:00
Thaddeus Crews 777c6637e9 Merge pull request #103214 from aaronjyoder/master
Add tab spacing modifier for tabs in TabBar and TabContainer
2025-03-24 10:00:54 -05:00
Pāvels Nadtočajevs 7675bc7df6 [RTL] Fix float and int matching in FX environment. 2025-03-24 09:27:22 +02:00
Rémi Verschelde 765a750d01 Merge pull request #104356 from Aryombre/104257-fix-selection-lineedit
LineEdit: Fix selection rectangle when text overflows container
2025-03-21 13:03:57 +01:00
Thaddeus Crews a76c1ac1d6 Merge pull request #104141 from BrotherShort/treeitem-rename-edit-offset
Fix the TreeItem rename LineEdit is offset
2025-03-19 17:46:08 -05:00
Rémi Verschelde 5045d549f9 Merge pull request #99515 from KoBeWi/shapez.godot
Refactor ColorPicker shapes
2025-03-19 14:53:57 +01:00
kobewi 10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
Rémi Verschelde e0c9978cff Merge pull request #103912 from unvermuthet/texture-size-changed
VideoStreamPlayer: Redraw when stream resolution changes
2025-03-19 12:27:02 +01:00
Rémi Verschelde 22e41a2b5f Merge pull request #103728 from bruvzg/lbl_min_sz_ex_sp
[Label] Fix min. size calculation counting extra spacing twice.
2025-03-19 12:26:51 +01:00
Rémi Verschelde 3b8385a6be Merge pull request #101824 from bruvzg/wrap_align
[TextEdit] Use actual indentation offset instead of space width for wrapped lines.
2025-03-19 12:26:20 +01:00
Rémi Verschelde 7ad0b9b16c Merge pull request #97495 from Delsin-Yu/control_recursive_disable_children
[GUI] Implement properties that can recursively disable child controls' `Focus Mode` & `Mouse Filter`
2025-03-19 12:26:03 +01:00
Pāvels Nadtočajevs 2fb5059c63 [TextEdit] Use actual indentation offset instead of space width for wrapped lines. 2025-03-19 12:50:43 +02:00
Aryombre 209189b969 fix selection in LineEdit 2025-03-19 10:50:47 +01:00
Thaddeus Crews b7eda9dbc1 Merge pull request #104230 from bruvzg/start_clip
Add properties to configure space trimming on line break.
2025-03-18 14:42:44 -05:00
kobewi ef0408e704 Refactor ColorPicker shapes 2025-03-18 18:57:26 +01:00
Thaddeus Crews ea62170dac Core: Add constexpr constructors/operators to math structs
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
2025-03-17 12:15:31 -05:00
Thaddeus Crews 49fcd4ce46 Merge pull request #101546 from bruvzg/portal_color_picker
[Linux] Implement native color picker.
2025-03-17 10:52:29 -05:00