fixed default init of values from config

merge-notes
isark 2 years ago
parent ca0188c87b
commit b010557b4f

@ -24,23 +24,23 @@ pub struct Rect {
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct Config { pub struct Config {
#[serde(default)] #[serde(default = "Config::default_initial_plan_window_position")]
pub initial_plan_window_position: Rect, pub initial_plan_window_position: Rect,
#[serde(default)] #[serde(default = "Config::default_hide_on_unfocus")]
pub hide_on_unfocus: bool, pub hide_on_unfocus: bool,
#[serde(default)] #[serde(default = "Config::default_toggle_overlay")]
pub toggle_overlay: String, pub toggle_overlay: String,
#[serde(default)] #[serde(default = "Config::default_prev")]
pub prev: String, pub prev: String,
#[serde(default)] #[serde(default = "Config::default_next")]
pub next: String, pub next: String,
#[serde(default)] #[serde(default = "Config::default_plan_bg")]
pub plan_bg: String, pub plan_bg: String,
#[serde(default)] #[serde(default = "Config::default_backdrop_bg")]
pub backdrop_bg: String, pub backdrop_bg: String,
#[serde(default)] #[serde(default = "Config::default_note_default_fg")]
pub note_default_fg: String, pub note_default_fg: String,
#[serde(default)] #[serde(default = "Config::default_poe_client_log_path")]
pub poe_client_log_path: Option<PathBuf>, pub poe_client_log_path: Option<PathBuf>,
} }

Loading…
Cancel
Save