bevy/crates/bevy_ui/src
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
..
experimental
layout ScrollPosition scale factor fix (#16617) 2025-01-03 19:26:40 +01:00
render box-shadow clipping fix (#16790) 2025-01-03 19:26:37 +01:00
widget fix: setting content size to rect size if image has a rect (#16457) 2024-11-22 21:24:04 +01:00
accessibility.rs Properly set accessible value on label nodes (#16418) 2024-11-17 22:09:09 +01:00
focus.rs use scale factor for touches in UI focus (#16522) 2024-11-26 23:31:52 +01:00
geometry.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
lib.rs Add flags to SpritePlugin and UiPlugin to allow disabling their picking backend (without needing to disable features). (#16473) 2024-11-22 21:24:03 +01:00
measurement.rs Use CosmicFontSystem in public bevy_text APIs and remove cosmic_text re-export (#16063) 2024-10-24 23:33:23 +02:00
node_bundles.rs UiImage -> ImageNode, UiImageSize -> ImageNodeSize (#16271) 2024-11-11 22:08:04 +01:00
picking_backend.rs Only use physical coords internally in bevy_ui (#16375) 2024-11-22 21:23:59 +01:00
stack.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
ui_material.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
ui_node.rs ScrollPosition scale factor fix (#16617) 2025-01-03 19:26:40 +01:00
update.rs Only use physical coords internally in bevy_ui (#16375) 2024-11-22 21:23:59 +01:00