fix: use the user provided theme even when setting system theme

the user may have set a preferred value which should be used.
This commit is contained in:
Ashley Wulber 2024-05-30 13:43:36 -04:00 committed by Ashley Wulber
parent bd48ad0fb5
commit 80879213af

View file

@ -409,11 +409,9 @@ impl<T: Application> Cosmic<T> {
}
Message::AppThemeChange(mut theme) => {
// Apply last-known system theme if the system theme is preferred.
if let ThemeType::System { theme: _, .. } = theme.theme_type {
self.app.core_mut().theme_sub_counter += 1;
theme = self.app.core().system_theme.clone();
let portal_accent = self.app.core().portal_accent;
if let Some(a) = portal_accent {
let t_inner = theme.cosmic();