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]
|
[dependencies]
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
druid = "0.7.0"
|
druid = "0.7.0"
|
||||||
|
druid-shell = "0.7.0"
|
||||||
rodio = "0.15.0"
|
rodio = "0.15.0"
|
||||||
serde = { version = "1.0.136", features = ["derive"] }
|
serde = { version = "1.0.136", features = ["derive"] }
|
||||||
toml = "0.5.8"
|
toml = "0.5.8"
|
||||||
|
|
|
@ -61,11 +61,17 @@ impl AppDelegate<state::App> for Delegate {
|
||||||
id: WindowId,
|
id: WindowId,
|
||||||
_data: &mut state::App,
|
_data: &mut state::App,
|
||||||
_env: &Env,
|
_env: &Env,
|
||||||
_ctx: &mut DelegateCtx,
|
ctx: &mut DelegateCtx,
|
||||||
) {
|
) {
|
||||||
info!("Window added, id: {:?}", id);
|
info!("Window added, id: {:?}", id);
|
||||||
if self.status_win_id.is_none() {
|
if self.status_win_id.is_none() {
|
||||||
self.status_win_id = Some(id);
|
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