File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,16 @@ pub struct Window {
412412 ///
413413 /// [`WindowAttributesExtIOS::with_prefers_home_indicator_hidden`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/ios/trait.WindowAttributesExtIOS.html#tymethod.with_prefers_home_indicator_hidden
414414 pub prefers_home_indicator_hidden : bool ,
415+ /// Sets whether the Window prefers the status bar hidden.
416+ ///
417+ /// Corresponds to [`WindowAttributesExtIOS::with_prefers_status_bar_hidden`].
418+ ///
419+ /// # Platform-specific
420+ ///
421+ /// - Only used on iOS.
422+ ///
423+ /// [`WindowAttributesExtIOS::with_prefers_status_bar_hidden`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/ios/trait.WindowAttributesExtIOS.html#tymethod.with_prefers_status_bar_hidden
424+ pub prefers_status_bar_hidden : bool ,
415425}
416426
417427impl Default for Window {
@@ -454,6 +464,7 @@ impl Default for Window {
454464 titlebar_show_title : true ,
455465 titlebar_show_buttons : true ,
456466 prefers_home_indicator_hidden : false ,
467+ prefers_status_bar_hidden : false ,
457468 }
458469 }
459470}
Original file line number Diff line number Diff line change @@ -147,6 +147,8 @@ impl WinitWindows {
147147 use winit:: platform:: ios:: WindowAttributesExtIOS ;
148148 winit_window_attributes = winit_window_attributes
149149 . with_prefers_home_indicator_hidden ( window. prefers_home_indicator_hidden ) ;
150+ winit_window_attributes = winit_window_attributes
151+ . with_prefers_status_bar_hidden ( window. prefers_status_bar_hidden ) ;
150152 }
151153
152154 let display_info = DisplayInfo {
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ fn main() {
3030 recognize_rotation_gesture : true ,
3131 // Only has an effect on iOS
3232 prefers_home_indicator_hidden : true ,
33+ // Only has an effect on iOS
34+ prefers_status_bar_hidden : true ,
3335 ..default ( )
3436 } ) ,
3537 ..default ( )
You can’t perform that action at this time.
0 commit comments