Commit Graph

183 Commits

Author SHA1 Message Date
StarryWorm 300f7c53c0 Add SCROLL_MODE_MAXIMIZE_FIRST to ScrollContainer
This change enables `ScrollContainer` to make full use of the newly added `custom_maximum_size`. This mode behaves like `SCROLL_MODE_AUTO` but prioritizes expanding the size of the `ScrollContainer` up to its `custom_maximum_size` before displaying scroll bars.
2026-04-07 14:34:13 -04:00
StarryWorm bdca8b66e7 Add custom_maximum_size to Control
This property mirrors `custom_minimum_size` and enables the user to set a size the `Control`. Enabling `propagate_maximum_size` forces all children to respect this node's maximum_size.
Not all `Control` types handle this gracefully, which may result in content clipping.
2026-04-07 14:34:12 -04:00
Rémi Verschelde ab9175302e Merge pull request #117830 from bruvzg/ac_scroll
[Accessibility] Do not focus on ScrollContainer scroll bars.
2026-03-26 16:02:10 +01:00
Pāvels Nadtočajevs 4a44702b29 [Accessibility] Do not focus on ScrollContainer scroll bars. 2026-03-25 17:08:28 +02:00
voylin 4282c503c9 Add scroll switch to ScrollContainer 2026-03-17 11:47:08 +09:00
Rémi Verschelde eabb9a63d4 Rename callable_method_pointer.h to callable_mp.h and include it explicitly
This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.

Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.
2026-03-04 16:23:23 +01:00
Rémi Verschelde 8c0f175c94 Decouple RenderingServer from as much of the codebase as possible
Notably decouples it from:
- AccessibilityServer
- DisplayServer
- Viewport
- Window
2026-03-03 12:48:07 +01:00
Pāvels Nadtočajevs 1306221592 Move accessibility methods/enums from DisplayServer to the AccessibilityServer dedicated singleton. 2026-03-02 13:48:29 +02:00
Thaddeus Crews e380a41752 Style: Add class_db.h includes explicitly 2026-02-26 15:50:28 -06:00
Nolan Darilek d53ab67b83 GUI: Add accessibility region role for landmark navigation
Adds ROLE_REGION to allow controls to be marked as accessibility
regions/landmarks.

- Add `accessibility_region` property to Control
- Add ROLE_REGION to DisplayServer and AccessKit mapping
- Prevent Container/ScrollContainer from overriding region role
- Fix TabContainer to update accessibility when tabs change
- Mark editor docks, main screen, bottom panel, and scene tabs as regions
2026-01-19 08:12:33 -05:00
Michael Alexsander 8e305bb701 Add color theme for scroll hints 2026-01-08 14:10:55 -03:00
Michael Alexsander 88d4d7222a Fix ScrollContainer's bottom scroll hint ignoring margins 2025-12-15 11:52:38 -03:00
Rémi Verschelde d09a3d83ff Merge pull request #113574 from YeldhamDev/take_the_hint
Enable scroll hints for several parts of the editor
2025-12-09 19:32:11 +01:00
Michael Alexsander f187b8b2bf Enable scroll hints for several parts of the editor 2025-12-09 10:55:26 -03:00
Michael Alexsander 3b1be372a0 Fix scrollbar separation being at the wrong side in ScrollContainer with a RTL layout 2025-12-08 13:20:11 -03:00
Michael Alexsander ad22add5ca Fix ScrollContainer ignoring internal nodes added externally 2025-12-03 09:11:06 -03:00
Michael Alexsander 639e396d98 Add scroll hints to ScrollContainer and Tree 2025-11-26 11:04:49 -03:00
fish d2c3fdaec0 Make scrollbar margins affect minimum size 2025-11-04 17:45:37 -08:00
fish 1a72f4c3ba Add scrollbar_h/v_separation theme properties to ScrollContainer 2025-10-24 01:16:51 -07:00
Michael Alexsander e9a5208c8b Fix incorrect margins in ScrollContainer with focus border enabled 2025-10-07 20:49:33 -03:00
Michael Alexsander aeb3a45c97 Hide Control focus when given via mouse input 2025-09-19 13:43:29 -03:00
Pāvels Nadtočajevs 3f757c41fc Update access-kit to 0.17.0 2025-07-29 08:37:01 +03:00
kobewi df70765af0 Fix SCROLL_MODE_RESERVE with RTL layout 2025-05-28 23:24:27 +02:00
kobewi d32d2e9b51 Remove NOTIFICATION_ENTER_TREE when NOTIFICATION_THEME_CHANGED is used 2025-05-06 15:28:03 +02:00
lawnjelly f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Pāvels Nadtočajevs fd1eeacf23 [ScrollContainer] Fix focus rect draw position in RTL layout. 2025-04-28 11:26:01 +03:00
KaiN b6b3b0e0d6 Unify ScrollBar/ScrollContainer scroll delta 2025-04-23 21:15:44 +02:00
Thaddeus Crews 039d9ffd30 Merge pull request #104317 from pafuent/fixing_wrong_focus_style_clipping_on_scroll_container
Fix `ScrollContainer` focus border issue
2025-04-15 12:28:50 -05:00
Pablo Andres Fuente e1384dd159 Fix ScrollContainer focus border issue
Fixes #100176

Instead of using no clipping technique to draw the focus border because
it causes problems if a `ScrollContainer` is nested in another
`ScrollContainer`, now the focus border is drawn using an internal
`PanelContainer`.
2025-04-14 17:51:43 -03:00
Jayden Sipe 292119dd68 Fix smooth scrolling tied to physics process 2025-04-11 17:14:25 -04:00
Pāvels Nadtočajevs b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
dugramen 3c85281610 Scroll inspector while drag hovering near the edge 2025-03-26 12:37:12 -04:00
Thaddeus Crews 69c5b03070 Merge pull request #101625 from Rindbee/fix-follow-focus-in-rotated-ScrollContainer
Fix Follow Focus in a rotated `ScrollContainer`
2025-01-27 09:46:14 -06:00
Janis Kirsteins 815e905972 Typo fix: rename SortableVisbilityMode 2025-01-19 00:33:39 +01:00
风青山 b75acc3ccd Fix Follow Focus in a rotated ScrollContainer
Calculate based on the `ScrollContainer`'s space to eliminate possible
rotation. The global rect already has applied the rotation, so it
should not be used.
2025-01-16 14:58:43 +08:00
Pablo Andres Fuente 86ea0127a3 Add a focus border on ScrollContainer
Also added new unit tests for `Control`.

Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2024-11-23 23:54:38 -03:00
Adam Scott 0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
kobewi 59c66585d5 Fix ScrollContainer configuration warnings 2024-09-21 19:53:02 +02:00
kobewi b36bebc6da Add SCROLL_MODE_RESERVE to ScrollContainer 2024-09-12 14:02:01 +02:00
Jordyfel 6d516a2609 Fix scroll container min size calculation 2024-09-10 17:25:34 +03:00
Giganzo 7e549aa52e Fix rtl on follow focus
Change right_margin to side_margin
2024-07-23 10:29:55 +02:00
A Thousand Ships fbb879debd [Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
kobewi 02e1e6d1ec Add visibilty mode to as_sortable_control() 2024-06-03 20:01:31 +02:00
Michael Alexsander 9353081338 Fix scrollbar issues in ScrollContainer 2024-05-19 22:20:43 -03:00
kobewi 5c28814b39 Add as_sortable_control() to unify Container checks 2024-05-08 11:45:52 +02:00
Sofox 30356a488f Enabled 'Scrolling' signal when scrolling with middle mouse on RichTextLabel/ScrollContainer 2024-04-22 20:44:03 +01:00
A Thousand Ships 79ba22a73f Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
Rémi Verschelde 21f0529aa9 Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa4.
2024-02-17 19:03:21 +01:00
RedMser d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +01:00
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00