summaryrefslogtreecommitdiff
path: root/src/layout/spacing.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-11 22:38:30 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-11 22:38:30 +0200
commitd3bc4ec07349a96c3863ddce63c2e52b5e7e9f2f (patch)
tree09c582973b58f05f9248d88f0020bf1dda262aa5 /src/layout/spacing.rs
parentf04ad0ffa5f34bb7fd97e5c94c7547f96904220c (diff)
Refactor layouting base 🪁
Diffstat (limited to 'src/layout/spacing.rs')
-rw-r--r--src/layout/spacing.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/layout/spacing.rs b/src/layout/spacing.rs
index 766ff4d2..427cb7b0 100644
--- a/src/layout/spacing.rs
+++ b/src/layout/spacing.rs
@@ -2,16 +2,21 @@ use std::fmt::{self, Debug, Formatter};
use super::*;
-/// A node that inserts spacing.
+/// A spacing node.
#[derive(Copy, Clone, PartialEq)]
pub struct Spacing {
+ /// The amount of spacing to insert.
pub amount: Length,
+ /// Spacing interaction, see [Softness's] documentation for more
+ /// information.
+ ///
+ /// [Softness's]: enum.Softness.html
pub softness: Softness,
}
#[async_trait(?Send)]
impl Layout for Spacing {
- async fn layout(&self, _: &mut LayoutContext, _: LayoutConstraints) -> Vec<Layouted> {
+ async fn layout(&self, _: &mut LayoutContext, _: &Areas) -> Vec<Layouted> {
vec![Layouted::Spacing(self.amount)]
}
}