fix: update libcosmic and use load configured theme instead of defaults

This commit is contained in:
Ashley Wulber 2024-05-30 13:59:14 -04:00
parent 4b753ff2aa
commit 61a5960c70
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
3 changed files with 46 additions and 35 deletions

View file

@ -27,8 +27,16 @@ pub enum AppTheme {
impl AppTheme {
pub fn theme(&self) -> theme::Theme {
match self {
Self::Dark => theme::Theme::dark(),
Self::Light => theme::Theme::light(),
Self::Dark => {
let mut t = theme::system_dark();
t.theme_type.prefer_dark(Some(true));
t
}
Self::Light => {
let mut t = theme::system_light();
t.theme_type.prefer_dark(Some(false));
t
}
Self::System => theme::system_preference(),
}
}