mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
This commit is contained in:
@@ -70,7 +70,7 @@ pub fn read_window_info(
|
||||
pub fn window_builder<E>(
|
||||
event_loop: &EventLoopWindowTarget<E>,
|
||||
title: &str,
|
||||
native_options: &epi::NativeOptions,
|
||||
native_options: &mut epi::NativeOptions,
|
||||
window_settings: Option<WindowSettings>,
|
||||
) -> ViewportBuilder {
|
||||
let epi::NativeOptions {
|
||||
@@ -173,7 +173,10 @@ pub fn window_builder<E>(
|
||||
}
|
||||
}
|
||||
|
||||
window_builder
|
||||
match std::mem::take(&mut native_options.window_builder) {
|
||||
Some(hook) => hook(window_builder),
|
||||
None => window_builder,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apply_native_options_to_window(
|
||||
@@ -326,6 +329,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,
|
||||
}
|
||||
|
||||
@@ -388,6 +393,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,
|
||||
beginning: Instant::now(),
|
||||
}
|
||||
@@ -578,7 +585,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,
|
||||
|
||||
Reference in New Issue
Block a user