fix: update libcosmic and use load configured theme instead of defaults
This commit is contained in:
parent
4b753ff2aa
commit
61a5960c70
3 changed files with 46 additions and 35 deletions
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue