You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
use serde::{Deserialize, Serialize};
|
|
|
|
#[cfg(not(build_only))]
|
|
use ts_rs::TS;
|
|
|
|
#[cfg_attr(not(build_only), derive(TS))]
|
|
#[cfg_attr(not(build_only), ts(rename_all = "camelCase"))]
|
|
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct Rect {
|
|
x: f32,
|
|
y: f32,
|
|
width: f32,
|
|
height: f32,
|
|
}
|
|
|
|
#[cfg_attr(not(build_only), derive(TS))]
|
|
#[cfg_attr(not(build_only), ts(rename_all = "camelCase"))]
|
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct Config {
|
|
pub initial_plan_window_position: Rect,
|
|
pub hide_on_unfocus: bool,
|
|
pub toggle_overlay: String,
|
|
pub plan_bg: String,
|
|
pub backdrop_bg: String,
|
|
}
|
|
|
|
impl Default for Config {
|
|
fn default() -> Self {
|
|
Self {
|
|
initial_plan_window_position: Default::default(),
|
|
hide_on_unfocus: true,
|
|
toggle_overlay: "F6".into(),
|
|
plan_bg: "#00000010".to_string(),
|
|
backdrop_bg: "#00000030".to_string(),
|
|
}
|
|
}
|
|
}
|