mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
6fc619d34a
# Objective The AccessKit PR removed the loading of the image logo from the UI example. It also added some alt text with `TextStyle::default()` as a child of the logo image node. If you give an image node a child, then its size is no longer determined by the measurefunc that preserves its aspect ratio. Instead, its width and height are determined by the constraints set on the node and the size of the contents of the node. In this case, the image node is set to have a width of 500 with no constraints on its height. So it looks at its child node to determine what height it should take. Because the child has `TextStyle::default` it allocates no space for the text, the height of the image node is set to zero and the logo isn't drawn. Fixes #8805 ## Solution Load the image, and set min_size and max_size constraints of 500 by 125 pixels. |
||
---|---|---|
.. | ||
button.rs | ||
flex_layout.rs | ||
font_atlas_debug.rs | ||
grid.rs | ||
overflow.rs | ||
overflow_debug.rs | ||
relative_cursor_position.rs | ||
size_constraints.rs | ||
text.rs | ||
text_debug.rs | ||
text_wrap_debug.rs | ||
transparency_ui.rs | ||
ui.rs | ||
ui_scaling.rs | ||
window_fallthrough.rs | ||
z_index.rs |