fix(appearance): reload system theme after resetting mode

This commit is contained in:
Michael Aaron Murphy 2025-07-18 04:58:17 +02:00
parent efe872ccf2
commit 60f2896e41
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -342,11 +342,15 @@ impl Page {
let r = self.roundness;
self.drawer.reset(&self.theme_manager);
#[cfg(feature = "wayland")]
tokio::task::spawn(async move {
Self::update_panel_radii(r);
Self::update_panel_spacing(Density::Standard);
});
tasks.push(cosmic::task::future(async move {
#[cfg(feature = "wayland")]
{
Self::update_panel_radii(r);
Self::update_panel_spacing(Density::Standard);
}
app::Message::SetTheme(cosmic::theme::system_preference())
}));
}
#[cfg(feature = "xdg-portal")]
@ -521,11 +525,7 @@ impl Page {
let mut tasks = cosmic::Task::batch(tasks);
if let Some(stage) = theme_staged {
tasks = tasks
.chain(self.theme_manager.build_theme(stage))
.chain(cosmic::task::future(async {
app::Message::SetTheme(cosmic::theme::system_preference())
}))
tasks = tasks.chain(self.theme_manager.build_theme(stage))
}
self.can_reset = if self.theme_manager.mode().is_dark {