mirror of
https://github.com/bevyengine/bevy
synced 2025-01-23 02:15:15 +00:00
2d5ef75c9f
# Objective Add viewport variants to `Val` that specify a percentage length based on the size of the window. ## Solution Add the variants `Vw`, `Vh`, `VMin` and `VMax` to `Val`. Add a physical window size parameter to the `from_style` function and use it to convert the viewport variants to Taffy Points values. One issue: It isn't responsive to window resizes. So `flex_node_system` has to do a full update every time the window size changes. Perhaps this can be fixed with support from Taffy. --- ## Changelog * Added `Val` viewport unit variants `Vw`, `Vh`, `VMin` and `VMax`. * Modified `convert` module to support the new `Val` variants. * Changed `flex_node_system` to support the new `Val` variants. * Perform full layout update on screen resizing, to propagate the new viewport size to all nodes. |
||
---|---|---|
.. | ||
flex | ||
render | ||
widget | ||
accessibility.rs | ||
camera_config.rs | ||
focus.rs | ||
geometry.rs | ||
lib.rs | ||
node_bundles.rs | ||
stack.rs | ||
ui_node.rs | ||
update.rs |