bevy/crates
ickshonpe 75c9e7a198 ScrollPosition scale factor fix (#16617)
# Objective

Scroll position uses physical coordinates. This means scrolling may go
faster or slower depending on the scroll factor. Also the scrolled
position will change when the scale factor changes.

## Solution

In `ui_layout_system` convert `max_possible_offset` to logical
coordinates before clamping the scroll position. Then convert the
clamped scroll position to physical coordinates before propagating it to
the node's children.

## Testing

Look at the `scroll` example. On main if you change your display's scale
factor the items displayed by the scrolling lists will change because
`ScrollPosition`'s displacement values don't respect scale factor. With
this PR the displacement will be scaled too, and the won't move.
2025-01-03 19:26:40 +01:00
..
bevy_a11y Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_animation Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_app Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_asset Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_audio Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_color Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_core Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_core_pipeline Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_derive Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_dev_tools Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_diagnostic Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_dylib Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_ecs Expose SystemMeta's access field as part of public API (#16625) 2025-01-03 19:15:53 +01:00
bevy_encase_derive Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_gilrs Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_gizmos Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_gltf Make bevy_gltf compile without bevy_animation feature (#16551) 2025-01-03 19:15:53 +01:00
bevy_hierarchy Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_image Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_input Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_internal Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_log Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_macro_utils Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_math Fix atan2 docs (#16673) 2025-01-03 19:15:53 +01:00
bevy_mesh Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_mikktspace Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_pbr Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_picking picking: disable raycast backface culling for Mesh2d (#16657) 2025-01-03 19:15:53 +01:00
bevy_ptr Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_reflect Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_remote BrpQueryRow has field deserialization fix (#16613) 2025-01-03 19:15:53 +01:00
bevy_render Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_scene Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_sprite Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_state Make StateTransitionSteps public (#16612) 2025-01-03 19:15:53 +01:00
bevy_tasks Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_text Add missing registration for TextEntity (#16649) 2025-01-03 19:15:53 +01:00
bevy_time Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_transform Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_ui ScrollPosition scale factor fix (#16617) 2025-01-03 19:26:40 +01:00
bevy_utils Release 0.15.0 2024-11-29 01:50:42 +01:00
bevy_window add missing type registration for Monitor (#16685) 2025-01-03 19:15:53 +01:00
bevy_winit Release 0.15.0 2024-11-29 01:50:42 +01:00