bevy/crates
ickshonpe 679c7569e7
Remove the measure func for image nodes with the default UI texture (#16351)
# Objective

`ButtonBundle` has an `ImageNode` component (renamed from `UiImage`)
which wasn't a problem in 0.14 but in 0.15 `requires` pulls in the
`ContentSize` and `NodeImageSize` which means that by default
`ButtonBundle` nodes are given a measure func based on the size of the
image belonging to `TRANSPARENT_IMAGE_HANDLE`, which is 1x1.

This doesn't make sense and the behaviour for default image nodes should
either be to go to zero size or not add a measure func.

## Solution

Check if an image has a `TRANSPARENT_IMAGE_HANDLE` and if it does remove
its measure func.

Possibly a zero-sized measure would make more sense, but that would
break existing code.

## Testing

Used `ButtonBundle` in the 0.15 `button` example and the border doesn't
render, after this change it does.
2024-11-12 08:45:15 +01:00
..
bevy_a11y Remove accesskit re-export from bevy_a11y (#16257) 2024-11-11 22:14:07 +01:00
bevy_animation Incorporate all node weights in additive blending (#16279) 2024-11-11 21:50:47 +01:00
bevy_app Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_asset Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_audio AudioPlayer::new() (#16287) 2024-11-11 22:08:10 +01:00
bevy_color Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_core Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_core_pipeline Fix missing import (#16337) 2024-11-11 22:18:05 +01:00
bevy_derive Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_dev_tools Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_diagnostic Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_dylib Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_ecs Fixed issue with derive_more Display Implementations (#16298) 2024-11-11 22:08:10 +01:00
bevy_encase_derive Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_gilrs Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_gizmos Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_gltf Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_hierarchy Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_image Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_input Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_internal Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_log Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_macro_utils Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_math Rename Rot2::angle_between to Rot2::angle_to (#16327) 2024-11-11 22:18:05 +01:00
bevy_mesh Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_mikktspace Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_pbr Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_picking Fix typos in bevy_picking module docs (#16265) 2024-11-11 22:08:10 +01:00
bevy_ptr Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_reflect Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_remote Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_render Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_scene Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_sprite Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_state Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_tasks Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_text Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
bevy_time Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_transform Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_ui Remove the measure func for image nodes with the default UI texture (#16351) 2024-11-12 08:45:15 +01:00
bevy_utils Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_window Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
bevy_winit Remove accesskit re-export from bevy_a11y (#16257) 2024-11-11 22:14:07 +01:00