diff --git a/profile.json b/profile.json index b1ee16e..ff9fa4d 100644 --- a/profile.json +++ b/profile.json @@ -4,16 +4,7 @@ "panels_shader": { "FadeWhite": { "strength": 10 } }, "panels": [ { - "geometry": { - "pos": { - "x": 0, - "y": 312 - }, - "size": { - "x": 1360, - "y": 768 - } - }, + "geometry": "1360x768+0+312", "duration": 1800, "fade_point": 1440, "parallax": { @@ -22,16 +13,7 @@ } }, { - "geometry": { - "pos": { - "x": 1360, - "y": 0 - }, - "size": { - "x": 1920, - "y": 1080 - } - }, + "geometry": "1920x1080+1360+0", "duration": 1800, "fade_point": 1440, "parallax": { diff --git a/zsw-util/src/rect.rs b/zsw-util/src/rect.rs index 7e3e204..c91f77d 100644 --- a/zsw-util/src/rect.rs +++ b/zsw-util/src/rect.rs @@ -4,12 +4,11 @@ use { anyhow::Context, cgmath::{num_traits::Num, Point2, Vector2}, - std::{error::Error, fmt}, + std::{borrow::Cow, error::Error, fmt}, }; /// A rectangle #[derive(PartialEq, Eq, Clone, Copy, Debug)] -#[derive(serde::Serialize, serde::Deserialize)] // TODO: serialize to string pub struct Rect
{ /// Position pub pos: Point2
,
@@ -131,3 +130,22 @@ impl fmt::Display for Rect(&self, serializer: S) -> Result