From aec30b89e0100a93605f61307948a967bb66a854 Mon Sep 17 00:00:00 2001 From: GyDi Date: Thu, 31 Mar 2022 23:11:50 +0800 Subject: [PATCH] feat: add theme setting --- src-tauri/src/core/verge.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src-tauri/src/core/verge.rs b/src-tauri/src/core/verge.rs index f5a728f..f80a6f8 100644 --- a/src-tauri/src/core/verge.rs +++ b/src-tauri/src/core/verge.rs @@ -45,6 +45,22 @@ pub struct VergeConfig { /// proxy guard duration pub proxy_guard_duration: Option, + + /// theme setting + pub theme_setting: Option, +} + +#[derive(Default, Debug, Clone, Deserialize, Serialize)] +pub struct VergeTheme { + pub primary_color: Option, + pub secondary_color: Option, + pub info_color: Option, + pub error_color: Option, + pub warning_color: Option, + pub success_color: Option, + + pub font_family: Option, + pub font_face: Option, } impl VergeConfig { @@ -203,6 +219,9 @@ impl Verge { if patch.enable_silent_start.is_some() { self.config.enable_silent_start = patch.enable_silent_start; } + if patch.theme_setting.is_some() { + self.config.theme_setting = patch.theme_setting; + } // should update system startup if patch.enable_auto_launch.is_some() {