fix(appearance): theme mode changing when selecting roundness
This commit is contained in:
parent
fd1fb8ab4a
commit
dd9bcaa94f
1 changed files with 30 additions and 29 deletions
|
|
@ -184,38 +184,39 @@ impl Manager {
|
||||||
let builder = customizer.builder.0.clone();
|
let builder = customizer.builder.0.clone();
|
||||||
let (current_theme, config) = customizer.theme.clone();
|
let (current_theme, config) = customizer.theme.clone();
|
||||||
|
|
||||||
tasks.push(cosmic::task::future(async move {
|
tasks.push(
|
||||||
if let Some(config) = config {
|
cosmic::Task::future(async move {
|
||||||
let new_theme = builder.build();
|
if let Some(config) = config {
|
||||||
|
let new_theme = builder.build();
|
||||||
|
|
||||||
theme_transaction!(config, current_theme, new_theme, {
|
theme_transaction!(config, current_theme, new_theme, {
|
||||||
accent;
|
accent;
|
||||||
accent_button;
|
accent_button;
|
||||||
background;
|
background;
|
||||||
button;
|
button;
|
||||||
destructive;
|
destructive;
|
||||||
destructive_button;
|
destructive_button;
|
||||||
link_button;
|
link_button;
|
||||||
icon_button;
|
icon_button;
|
||||||
palette;
|
palette;
|
||||||
primary;
|
primary;
|
||||||
secondary;
|
secondary;
|
||||||
shade;
|
shade;
|
||||||
success;
|
success;
|
||||||
text_button;
|
text_button;
|
||||||
warning;
|
warning;
|
||||||
warning_button;
|
warning_button;
|
||||||
window_hint;
|
window_hint;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
app::Message::from(super::Message::NewTheme(Box::new(new_theme)))
|
})
|
||||||
} else {
|
.discard(),
|
||||||
app::Message::None
|
);
|
||||||
}
|
|
||||||
}));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
cosmic::task::batch(tasks)
|
cosmic::task::batch(tasks).chain(cosmic::task::message(app::Message::SetTheme(
|
||||||
|
self.cosmic_theme(),
|
||||||
|
)))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue