From a6cae89b47246a235ed7b1093747c6f3bcb64da4 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Sat, 6 Feb 2021 12:54:44 +0100 Subject: =?UTF-8?q?Generalize=20child=20of=20NodeBackground=20=F0=9F=8D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/library/layout.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/library') diff --git a/src/library/layout.rs b/src/library/layout.rs index bbcd7898..2812a48f 100644 --- a/src/library/layout.rs +++ b/src/library/layout.rs @@ -1,9 +1,9 @@ use std::fmt::{self, Display, Formatter}; -use crate::{eval::Softness, layout::NodeBackground}; use crate::layout::{Expansion, Fill, NodeFixed, NodeSpacing, NodeStack}; use crate::paper::{Paper, PaperClass}; use crate::prelude::*; +use crate::{eval::Softness, layout::NodeBackground}; /// `align`: Align content along the layouting axes. /// @@ -210,7 +210,7 @@ pub fn box_(ctx: &mut EvalContext, args: &mut Args) -> Value { if let Some(color) = color { ctx.push(NodeBackground { fill: Fill::Color(color), - child: fixed_node, + child: Node::Any(fixed_node.into()), }) } else { ctx.push(fixed_node); -- cgit v1.2.3