fix: use loaded theme from config, instead of falling back to default theme when there is an error
This commit is contained in:
parent
d6355613c9
commit
57a26e2da8
1 changed files with 9 additions and 1 deletions
|
|
@ -45,7 +45,15 @@ impl From<(Option<Config>, Option<Config>, Option<Vec<Srgba>>)> for ThemeCustomi
|
|||
Option<Vec<Srgba>>,
|
||||
),
|
||||
) -> Self {
|
||||
let theme = Theme::get_entry(theme_config.as_ref().unwrap()).unwrap_or_default();
|
||||
let theme = match Theme::get_entry(theme_config.as_ref().unwrap()) {
|
||||
Ok(theme) => theme,
|
||||
Err((errs, theme)) => {
|
||||
for err in errs {
|
||||
tracing::warn!("Error while loading theme: {err:?}");
|
||||
}
|
||||
theme
|
||||
}
|
||||
};
|
||||
|
||||
let mut theme_builder = match ThemeBuilder::get_entry(builder_config.as_ref().unwrap()) {
|
||||
Ok(t) => t,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue