diff options
Diffstat (limited to 'src/library')
| -rw-r--r-- | src/library/boxed.rs | 6 | ||||
| -rw-r--r-- | src/library/keys.rs | 2 | ||||
| -rw-r--r-- | src/library/maps.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/library/boxed.rs b/src/library/boxed.rs index d3d5b591..7c0ea0c6 100644 --- a/src/library/boxed.rs +++ b/src/library/boxed.rs @@ -11,7 +11,7 @@ function! { parse(args, body, ctx) { Boxed { - body: parse!(expected: body, ctx), + body: parse!(optional: body, ctx).unwrap_or(SyntaxTree::new()), map: ExtentMap::new(&mut args, false)?, } } @@ -22,8 +22,8 @@ function! { let space = &mut ctx.spaces[0]; self.map.apply_with(ctx.axes, |axis, p| { let entity = match axis { - Horizontal => { space.expand.0 = true; &mut space.dimensions.x }, - Vertical => { space.expand.1 = true; &mut space.dimensions.y }, + Horizontal => { space.expand.horizontal = true; &mut space.dimensions.x }, + Vertical => { space.expand.vertical = true; &mut space.dimensions.y }, }; *entity = p.concretize(*entity) diff --git a/src/library/keys.rs b/src/library/keys.rs index c7e34839..969d92be 100644 --- a/src/library/keys.rs +++ b/src/library/keys.rs @@ -118,7 +118,7 @@ impl AlignmentKey { use AlignmentKey::*; use SpecificAxisKind::*; - let positive = axes.get_specific(axis).is_positive(); + let positive = axes.specific(axis).is_positive(); match (self, axis, positive) { (Origin, Horizontal, true) | (End, Horizontal, false) => Left, (End, Horizontal, true) | (Origin, Horizontal, false) => Right, diff --git a/src/library/maps.rs b/src/library/maps.rs index c89d46cb..077ebc5e 100644 --- a/src/library/maps.rs +++ b/src/library/maps.rs @@ -86,8 +86,8 @@ impl<E: ExpressionKind + Copy> ExtentMap<E> { let key = match arg.v.key.v.0.as_str() { "width" | "w" => AxisKey::Horizontal, "height" | "h" => AxisKey::Vertical, - "primary-size" => AxisKey::Primary, - "secondary-size" => AxisKey::Secondary, + "primary-size" | "ps" => AxisKey::Primary, + "secondary-size" | "ss" => AxisKey::Secondary, _ => if enforce { error!("expected dimension") } else { |
