feat(win): use modal level for...
...notifier and rest windows
This commit is contained in:
parent
de463ea965
commit
df99f204b7
|
@ -18,6 +18,7 @@ path = "src/main.rs"
|
|||
[dependencies]
|
||||
log = "0.4.14"
|
||||
druid = "0.7.0"
|
||||
druid-shell = "0.7.0"
|
||||
rodio = "0.15.0"
|
||||
serde = { version = "1.0.136", features = ["derive"] }
|
||||
toml = "0.5.8"
|
||||
|
|
|
@ -61,11 +61,17 @@ impl AppDelegate<state::App> for Delegate {
|
|||
id: WindowId,
|
||||
_data: &mut state::App,
|
||||
_env: &Env,
|
||||
_ctx: &mut DelegateCtx,
|
||||
ctx: &mut DelegateCtx,
|
||||
) {
|
||||
info!("Window added, id: {:?}", id);
|
||||
if self.status_win_id.is_none() {
|
||||
self.status_win_id = Some(id);
|
||||
} else {
|
||||
ctx.submit_command(
|
||||
druid::commands::CONFIGURE_WINDOW
|
||||
.with(druid::WindowConfig::default().set_level(druid_shell::WindowLevel::Modal))
|
||||
.to(Target::Window(id)),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue