|
| 1 | +use crate::align::{AlignH, AlignV}; |
| 2 | +use serde::{Deserialize, Serialize}; |
| 3 | + |
| 4 | +#[derive(Debug, Clone, Serialize, Deserialize, Default)] |
| 5 | +pub struct AppConfig { |
| 6 | + pub window: Option<WindowConfig>, |
| 7 | + pub theme: Option<String>, |
| 8 | + pub font: Option<FontConfig>, |
| 9 | + pub keys: Option<KeysConfig>, |
| 10 | +} |
| 11 | + |
| 12 | +#[derive(Debug, Clone, Serialize, Deserialize, Default)] |
| 13 | +pub struct KeysConfig { |
| 14 | + pub shortcuts: Option<Vec<crate::shortcut::Shortcut>>, |
| 15 | +} |
| 16 | + |
| 17 | +#[derive(Debug, Clone, Serialize, Deserialize, Default)] |
| 18 | +pub struct FontConfig { |
| 19 | + pub font: Option<String>, |
| 20 | + pub font_size: Option<f32>, |
| 21 | +} |
| 22 | + |
| 23 | +#[derive(Debug, Clone, Serialize, Deserialize, Default)] |
| 24 | +pub struct WindowConfig { |
| 25 | + pub w_width: Option<f64>, |
| 26 | + pub w_height: Option<f64>, |
| 27 | + pub align_h: Option<AlignH>, |
| 28 | + pub align_v: Option<AlignV>, |
| 29 | + pub margin_x: Option<f64>, |
| 30 | + pub margin_y: Option<f64>, |
| 31 | + pub padding: Option<f64>, |
| 32 | + pub line_height: Option<f64>, |
| 33 | + pub w_radius: Option<f64>, |
| 34 | +} |
| 35 | + |
| 36 | +#[derive(Debug, Clone, Serialize, Deserialize, Default)] |
| 37 | +pub struct Theme { |
| 38 | + pub name: Option<String>, |
| 39 | + pub bg_color: Option<String>, |
| 40 | + pub fg_color: Option<String>, |
| 41 | + pub bg_font_color: Option<String>, |
| 42 | + pub fg_font_color: Option<String>, |
| 43 | +} |
0 commit comments