summaryrefslogtreecommitdiffstats
path: root/src/config/clean/theme
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/clean/theme')
-rw-r--r--src/config/clean/theme/config.rs8
-rw-r--r--src/config/clean/theme/mod.rs4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/config/clean/theme/config.rs b/src/config/clean/theme/config.rs
index 9028490..5be88fc 100644
--- a/src/config/clean/theme/config.rs
+++ b/src/config/clean/theme/config.rs
@@ -1,7 +1,7 @@
use std::collections::HashMap;
use crate::config::raw::theme::AppThemeRaw;
-use crate::config::{parse_config_or_default, TomlConfigFile};
+use crate::config::{ConfigType, TomlConfigFile};
use crate::error::AppResult;
use super::style::AppStyle;
@@ -30,8 +30,10 @@ impl AppTheme {
}
impl TomlConfigFile for AppTheme {
- fn get_config(file_name: &str) -> Self {
- parse_config_or_default::<AppThemeRaw, AppTheme>(file_name)
+ type Raw = AppThemeRaw;
+
+ fn get_type() -> ConfigType {
+ ConfigType::Theme
}
}
diff --git a/src/config/clean/theme/mod.rs b/src/config/clean/theme/mod.rs
index a9f7cbb..a6694c9 100644
--- a/src/config/clean/theme/mod.rs
+++ b/src/config/clean/theme/mod.rs
@@ -5,7 +5,7 @@ pub mod tab;
pub use config::*;
#[cfg(not(target_os = "windows"))]
-const DEFAULT_CONFIG_FILE_PATH: &str = include_str!("../../../../config/theme.toml");
+pub const DEFAULT_CONFIG_FILE_PATH: &str = include_str!("../../../../config/theme.toml");
#[cfg(target_os = "windows")]
-const DEFAULT_CONFIG_FILE_PATH: &str = include_str!("..\\..\\..\\..\\config\\theme.toml");
+pub const DEFAULT_CONFIG_FILE_PATH: &str = include_str!("..\\..\\..\\..\\config\\theme.toml");