@@ -7,11 +7,12 @@ use winit::event_loop::ActiveEventLoop;
7
7
8
8
use raw_window_handle:: { HasDisplayHandle as _, HasWindowHandle as _} ;
9
9
10
- use egui:: { DeferredViewportUiCallback , NumExt as _ , ViewportBuilder , ViewportId } ;
10
+ use egui:: { DeferredViewportUiCallback , ViewportBuilder , ViewportId } ;
11
11
use egui_winit:: { EventResponse , WindowSettings } ;
12
12
13
13
use crate :: epi;
14
14
15
+ #[ cfg_attr( target_os = "ios" , allow( dead_code, unused_variables, unused_mut) ) ]
15
16
pub fn viewport_builder (
16
17
egui_zoom_factor : f32 ,
17
18
event_loop : & ActiveEventLoop ,
@@ -53,8 +54,10 @@ pub fn viewport_builder(
53
54
54
55
if clamp_size_to_monitor_size {
55
56
if let Some ( initial_window_size) = viewport_builder. inner_size {
56
- let initial_window_size = initial_window_size
57
- . at_most ( largest_monitor_point_size ( egui_zoom_factor, event_loop) ) ;
57
+ let initial_window_size = egui:: NumExt :: at_most (
58
+ initial_window_size,
59
+ largest_monitor_point_size ( egui_zoom_factor, event_loop) ,
60
+ ) ;
58
61
viewport_builder = viewport_builder. with_inner_size ( initial_window_size) ;
59
62
}
60
63
}
@@ -95,6 +98,7 @@ pub fn apply_window_settings(
95
98
}
96
99
}
97
100
101
+ #[ cfg( not( target_os = "ios" ) ) ]
98
102
fn largest_monitor_point_size ( egui_zoom_factor : f32 , event_loop : & ActiveEventLoop ) -> egui:: Vec2 {
99
103
crate :: profile_function!( ) ;
100
104
0 commit comments