Update system theme before creating window::State
This commit is contained in:
parent
04f53b5f62
commit
25b965d26a
1 changed files with 12 additions and 13 deletions
|
|
@ -635,20 +635,7 @@ async fn run_instance<P>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let is_first = window_manager.is_empty();
|
|
||||||
let window = window_manager.insert(
|
|
||||||
id,
|
|
||||||
window,
|
|
||||||
&program,
|
|
||||||
compositor
|
|
||||||
.as_mut()
|
|
||||||
.expect("Compositor must be initialized"),
|
|
||||||
exit_on_close_request,
|
|
||||||
system_theme,
|
|
||||||
);
|
|
||||||
|
|
||||||
let window_theme = window
|
let window_theme = window
|
||||||
.raw
|
|
||||||
.theme()
|
.theme()
|
||||||
.map(conversion::theme_mode)
|
.map(conversion::theme_mode)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
@ -661,6 +648,18 @@ async fn run_instance<P>(
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let is_first = window_manager.is_empty();
|
||||||
|
let window = window_manager.insert(
|
||||||
|
id,
|
||||||
|
window,
|
||||||
|
&program,
|
||||||
|
compositor
|
||||||
|
.as_mut()
|
||||||
|
.expect("Compositor must be initialized"),
|
||||||
|
exit_on_close_request,
|
||||||
|
system_theme,
|
||||||
|
);
|
||||||
|
|
||||||
window.raw.set_theme(conversion::window_theme(
|
window.raw.set_theme(conversion::window_theme(
|
||||||
window.state.theme_mode(),
|
window.state.theme_mode(),
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue