1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Fix iOS support in eframe (#3241)

* Fix the app only taking up half the screen size on iPad

* Fix request_repaint not working on iOS

* Always use run_and_exit on iOS since run_and_return is not supported by winit on iOS right now.

* Fix typo

* Fix eframe glow on ios

* Handle more cases
This commit is contained in:
lucasmerlin
2023-08-22 14:35:18 +02:00
committed by GitHub
parent 2c7c59820e
commit 461328f54d
2 changed files with 26 additions and 0 deletions

View File

@@ -138,6 +138,9 @@ pub fn window_builder<E>(
window_builder = window_builder_drag_and_drop(window_builder, *drag_and_drop_support);
// Always use the default window size / position on iOS. Trying to restore the previous position
// causes the window to be shown too small.
#[cfg(not(target_os = "ios"))]
let inner_size_points = if let Some(mut window_settings) = window_settings {
// Restore pos/size from previous session
@@ -163,6 +166,7 @@ pub fn window_builder<E>(
*initial_window_size
};
#[cfg(not(target_os = "ios"))]
if *centered {
if let Some(monitor) = event_loop.available_monitors().next() {
let monitor_size = monitor.size().to_logical::<f64>(monitor.scale_factor());