From 5677766715886e915609a999210c6125ea02f2e7 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Wed, 24 Nov 2021 20:07:44 +0100 Subject: [PATCH] Fix some comments --- src/geom/linear.rs | 2 +- src/library/grid.rs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/geom/linear.rs b/src/geom/linear.rs index 494007b0a..059528e90 100644 --- a/src/geom/linear.rs +++ b/src/geom/linear.rs @@ -31,7 +31,7 @@ impl Linear { Self { rel, abs } } - /// Resolve this relative to the given `length`. + /// Resolve this linear's relative component to the given `length`. pub fn resolve(self, length: Length) -> Length { self.rel.resolve(length) + self.abs } diff --git a/src/library/grid.rs b/src/library/grid.rs index c7e6b8e95..772a56208 100644 --- a/src/library/grid.rs +++ b/src/library/grid.rs @@ -190,9 +190,15 @@ impl<'a> GridLayouter<'a> { /// Determine all column sizes. fn measure_columns(&mut self, ctx: &mut LayoutContext) { enum Case { + /// The column sizing is only determined by specified linear sizes. PurelyLinear, + /// The column sizing would be affected by the region size if it was + /// smaller. Fitting, + /// The column sizing is affected by the region size. Exact, + /// The column sizing would be affected by the region size if it was + /// larger. Overflowing, } @@ -284,7 +290,7 @@ impl<'a> GridLayouter<'a> { let mut regions = Regions::one(size, self.regions.base, Spec::splat(false)); - // For fractional rows, we can already resolve the correct + // For linear rows, we can already resolve the correct // base, for auto it's already correct and for fr we could // only guess anyway. if let TrackSizing::Linear(v) = self.rows[y] {