fix(appearance): reload system theme after resetting mode
This commit is contained in:
parent
efe872ccf2
commit
60f2896e41
1 changed files with 10 additions and 10 deletions
|
|
@ -342,11 +342,15 @@ impl Page {
|
||||||
let r = self.roundness;
|
let r = self.roundness;
|
||||||
self.drawer.reset(&self.theme_manager);
|
self.drawer.reset(&self.theme_manager);
|
||||||
|
|
||||||
#[cfg(feature = "wayland")]
|
tasks.push(cosmic::task::future(async move {
|
||||||
tokio::task::spawn(async move {
|
#[cfg(feature = "wayland")]
|
||||||
Self::update_panel_radii(r);
|
{
|
||||||
Self::update_panel_spacing(Density::Standard);
|
Self::update_panel_radii(r);
|
||||||
});
|
Self::update_panel_spacing(Density::Standard);
|
||||||
|
}
|
||||||
|
|
||||||
|
app::Message::SetTheme(cosmic::theme::system_preference())
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "xdg-portal")]
|
#[cfg(feature = "xdg-portal")]
|
||||||
|
|
@ -521,11 +525,7 @@ impl Page {
|
||||||
let mut tasks = cosmic::Task::batch(tasks);
|
let mut tasks = cosmic::Task::batch(tasks);
|
||||||
|
|
||||||
if let Some(stage) = theme_staged {
|
if let Some(stage) = theme_staged {
|
||||||
tasks = tasks
|
tasks = tasks.chain(self.theme_manager.build_theme(stage))
|
||||||
.chain(self.theme_manager.build_theme(stage))
|
|
||||||
.chain(cosmic::task::future(async {
|
|
||||||
app::Message::SetTheme(cosmic::theme::system_preference())
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.can_reset = if self.theme_manager.mode().is_dark {
|
self.can_reset = if self.theme_manager.mode().is_dark {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue