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

Move App::persist_window to NativeOptions and App::max_size_points to WebOptions (#3397)

* Move `App::persist_window` to `NativeOptions`

* Move `App::max_size_points` to `WebOptions`

* Build fixes
This commit is contained in:
Emil Ernerfeldt
2023-09-27 08:48:48 +02:00
committed by GitHub
parent 1b18f8e266
commit b3e19f5b7d
3 changed files with 21 additions and 15 deletions

View File

@@ -354,6 +354,8 @@ pub struct EpiIntegration {
can_drag_window: bool,
window_state: WindowState,
follow_system_theme: bool,
#[cfg(feature = "persistence")]
persist_window: bool,
app_icon_setter: super::app_icon::AppTitleIconSetter,
}
@@ -422,6 +424,8 @@ impl EpiIntegration {
can_drag_window: false,
window_state,
follow_system_theme: native_options.follow_system_theme,
#[cfg(feature = "persistence")]
persist_window: native_options.persist_window,
app_icon_setter,
}
}
@@ -593,7 +597,7 @@ impl EpiIntegration {
crate::profile_function!();
if let Some(window) = _window {
if _app.persist_native_window() {
if self.persist_window {
crate::profile_scope!("native_window");
epi::set_value(
storage,