pub fn window_size_policy(mut self, size_policy: WindowSizePolicy) -> Self {
        #[cfg(windows)]
        {
            // On Windows content_insets doesn't work on window with no initial size
            // so the window size can't be adapted to the content, to fix this a
            // non null initial size is set here.
            if size_policy == WindowSizePolicy::Content {
                self.size = Some(Size::new(1., 1.))
            }
        }
        self.size_policy = size_policy;
        self
    }
/// Set the window size policy.
Set the window size policy.
Set the window size policy .
pub fn window_size_policy(mut self, size_policy: WindowSizePolicy) -> Self {
        #[cfg(windows)]
        {
            // On Windows content_insets doesn't work on window with no initial size
            // so the window size can't be adapted to the content, to fix this a
            // non null initial size is set here.
            if size_policy == WindowSizePolicy::Content {
                self.size = Some(Size::new(1., 1.))
            }
        }
        self.size_policy = size_policy;
        self
    }
pub fn window_size_policy ( mut self , size_policy : WindowSizePolicy ) -> Self { # [ cfg ( windows ) ] { // On Windows content_insets doesn't work on window with no initial size // so the window size can't be adapted to the content, to fix this a // non null initial size is set here. if size_policy == WindowSizePolicy :: Content { self . size = Some ( Size :: new ( 1. , 1. ) ) } } self . size_policy = size_policy ; self }
Set the window size policy.
Set the window size policy .
mut self
size_policy
WindowSizePolicy
mut self
size_policy
WindowSizePolicy