bevy/crates/bevy_ui/src/widget
ickshonpe a35ed552fa
Fix Node::physical_rect and add a physical_size method (#8551)
# Objective

* `Node::physical_rect` divides the logical size of the node by the
scale factor, when it should multiply.
* Add a `physical_size` method to `Node` that calculates the physical
size of a node.

---

## Changelog

* Added a method `physical_size` to `Node` that calculates the physical
size of the `Node` based on the given scale factor.
* Fixed the `Node::physical_rect` method, the logical size should be
multiplied by the scale factor to get the physical size.
* Removed the `scale_value` function from the `text` widget module and
replaced its usage with `Node::physical_size`.
* Derived `Copy` for `Node` (since it's only a wrapped `Vec2`).
* Made `Node::size` const.
2023-05-11 18:38:01 +00:00
..
button.rs bevy_ui: Add FromReflect derives (#8495) 2023-04-26 12:17:23 +00:00
image.rs MeasureFunc improvements (#8402) 2023-05-01 15:40:53 +00:00
label.rs bevy_ui: Add FromReflect derives (#8495) 2023-04-26 12:17:23 +00:00
mod.rs Integrate AccessKit (#6874) 2023-03-01 22:45:04 +00:00
text.rs Fix Node::physical_rect and add a physical_size method (#8551) 2023-05-11 18:38:01 +00:00