bevy/crates/bevy_ui/src
ickshonpe 2d5ef75c9f
Val viewport unit variants (#8137)
# 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.
2023-03-21 19:14:27 +00:00
..
flex Val viewport unit variants (#8137) 2023-03-21 19:14:27 +00:00
render Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
widget Remove Val::Undefined (#7485) 2023-03-13 15:17:00 +00:00
accessibility.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
camera_config.rs Extract component derive (#7399) 2023-01-30 18:12:16 +00:00
focus.rs Improve UI stack docs and other small tweaks (#8094) 2023-03-16 12:54:52 +00:00
geometry.rs Remove Val::Undefined (#7485) 2023-03-13 15:17:00 +00:00
lib.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
node_bundles.rs Change the Node doc comments to state that it stores the size in logical pixels (#7896) 2023-03-04 19:24:56 +00:00
stack.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
ui_node.rs Val viewport unit variants (#8137) 2023-03-21 19:14:27 +00:00
update.rs Add z-index support with a predictable UI stack (#5877) 2022-11-02 22:06:04 +00:00