pub struct WindowMetrics {
pub size: Size,
pub scale: f64,
pub orientation: Orientation,
pub insets: WindowInsets,
}Expand description
The window’s logical size, device-pixel scale, derived Orientation and WindowInsets,
as a plain provide_context value: use_context subscribes to nothing, so a changed value is
visible only on the next rebuild. Re-provide it only on change, beside the standalone insets.
Fields§
§size: SizeThe window’s logical (density-independent) size.
scale: f64The device-pixel scale factor (logical → physical px multiplier).
orientation: OrientationDerived from size; no platform callback carries an orientation.
insets: WindowInsetsImplementations§
Source§impl WindowMetrics
impl WindowMetrics
Sourcepub fn new(size: Size, scale: f64, insets: WindowInsets) -> Self
pub fn new(size: Size, scale: f64, insets: WindowInsets) -> Self
Construct a WindowMetrics, deriving orientation from size.
Trait Implementations§
Source§impl Clone for WindowMetrics
impl Clone for WindowMetrics
impl Copy for WindowMetrics
Source§impl Debug for WindowMetrics
impl Debug for WindowMetrics
Source§impl PartialEq for WindowMetrics
impl PartialEq for WindowMetrics
impl StructuralPartialEq for WindowMetrics
Auto Trait Implementations§
impl Freeze for WindowMetrics
impl RefUnwindSafe for WindowMetrics
impl Send for WindowMetrics
impl Sync for WindowMetrics
impl Unpin for WindowMetrics
impl UnsafeUnpin for WindowMetrics
impl UnwindSafe for WindowMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.