Added ComputedNode.logical_size() method, returns node size accounting for window scale
This commit is contained in:
parent
82f6f704da
commit
3751faedc4
@ -118,6 +118,13 @@ impl ComputedNode {
|
||||
self.unrounded_size
|
||||
}
|
||||
|
||||
/// The calculate node size as width and height in physical pixels, accounting for a non-uniform window scale factor.
|
||||
///
|
||||
#[inline]
|
||||
pub const fn logical_size(&self) -> Vec2 {
|
||||
self.size * self.inverse_scale_factor
|
||||
}
|
||||
|
||||
/// Returns the thickness of the UI node's outline in physical pixels.
|
||||
/// If this value is negative or `0.` then no outline will be rendered.
|
||||
///
|
||||
|
||||
Loading…
Reference in New Issue
Block a user