bevy/crates/bevy_ui/src
s-puig ba09f35474
Fix UI texture atlas with offset (#13620)
# Objective

- Fixes #11219 

## Solution

- Scaling calculations use texture dimensions instead of layout
dimensions.

## Testing

- Did you test these changes? If so, how?

All UI examples look fine.

- How can other people (reviewers) test your changes? Is there anything
specific they need to know?

Example in #11219

## Migration Guide

```diff
let ui_node = ExtractedUiNode {
                    stack_index,
                    transform,
                    color,
                    rect,
                    image,
-                   atlas_size: Some(atlas_size * scale_factor),      
+                   atlas_scaling: Some(Vec2::splat(scale_factor)),
                    clip,
                    flip_x,
                    flip_y,
                    camera_entity,
                    border,
                    border_radius,
                    node_type,
                },
```

```diff
let computed_slices = ComputedTextureSlices {
    slices,
-    image_size,
}
```
2024-07-30 15:31:58 +00:00
..
layout fix issue with phantom ui node children (#14490) 2024-07-29 23:42:56 +00:00
render Fix UI texture atlas with offset (#13620) 2024-07-30 15:31:58 +00:00
widget Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
accessibility.rs Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
focus.rs Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
geometry.rs Fix uses of "it's" vs "its". (#13033) 2024-04-19 18:17:31 +00:00
lib.rs Clean up UiSystem system sets (#14228) 2024-07-15 15:27:38 +00:00
measurement.rs Fix error in bevy_ui when building without bevy_text (#14430) 2024-07-22 19:19:10 +00:00
node_bundles.rs Add BorderRadius field to ImageBundle (#14457) 2024-07-24 18:41:26 +00:00
stack.rs Merge BuildWorldChildren and BuildChildren traits. (#14052) 2024-07-01 14:29:39 +00:00
texture_slice.rs Fix UI texture atlas with offset (#13620) 2024-07-30 15:31:58 +00:00
ui_material.rs Fix incorrect link in UiMaterial documentation (#12361) 2024-03-07 22:09:57 +00:00
ui_node.rs Add and reflect Default impls for CSS grid types (#14443) 2024-07-22 21:39:59 +00:00
update.rs fix: use try_insert instead of insert in bevy_ui to prevent panics when despawning ui nodes (#13000) 2024-04-19 18:12:08 +00:00