Make missing scale = automatic selection

That was the intention, but I missed it before.
This commit is contained in:
Ivan Molodetskikh
2024-05-05 12:39:20 +04:00
parent df0ee996ee
commit 2e4a2e13b1
3 changed files with 36 additions and 9 deletions
+4 -4
View File
@@ -243,8 +243,8 @@ pub struct Output {
pub off: bool,
#[knuffel(argument)]
pub name: String,
#[knuffel(child, unwrap(argument), default = 1.)]
pub scale: f64,
#[knuffel(child, unwrap(argument))]
pub scale: Option<f64>,
#[knuffel(child, unwrap(argument, str), default = Transform::Normal)]
pub transform: Transform,
#[knuffel(child)]
@@ -260,7 +260,7 @@ impl Default for Output {
Self {
off: false,
name: String::new(),
scale: 1.,
scale: None,
transform: Transform::Normal,
position: None,
mode: None,
@@ -2291,7 +2291,7 @@ mod tests {
outputs: vec![Output {
off: false,
name: "eDP-1".to_owned(),
scale: 2.,
scale: Some(2.),
transform: Transform::Flipped90,
position: Some(Position { x: 10, y: 20 }),
mode: Some(ConfiguredMode {