fix: on init, set blur value if theme is already marked transparent
useful for things like the files dialog
This commit is contained in:
parent
217b4abe99
commit
e939d334f6
1 changed files with 14 additions and 7 deletions
|
|
@ -124,14 +124,21 @@ where
|
|||
let id = core.main_window_id().unwrap_or(window::Id::RESERVED);
|
||||
|
||||
let (model, command) = T::init(core, flags);
|
||||
let existing_theme = THEME.lock().unwrap();
|
||||
let blur = existing_theme.transparent;
|
||||
drop(existing_theme);
|
||||
|
||||
(
|
||||
Self::new(model),
|
||||
Task::batch([
|
||||
iced_runtime::window::run_with_handle(id, init_windowing_system),
|
||||
command,
|
||||
]),
|
||||
)
|
||||
let mut cmds = vec![
|
||||
iced_runtime::window::run_with_handle(id, init_windowing_system),
|
||||
command,
|
||||
];
|
||||
|
||||
if blur {
|
||||
cmds.push(crate::task::message(crate::action::cosmic(
|
||||
Action::BlurEnabled,
|
||||
)));
|
||||
}
|
||||
(Self::new(model), Task::batch(cmds))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "multi-window"))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue