Skip to main content

WindowBoundsExt

Trait WindowBoundsExt 

Source
pub trait WindowBoundsExt: Sized {
    // Required method
    fn centered(size: Size<Pixels>, cx: &App) -> Self;
}
Expand description

Window-bounds helpers that require access to the application’s display state.

Required Methods§

Source

fn centered(size: Size<Pixels>, cx: &App) -> Self

Creates a new window bounds that centers the window on the screen.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§