summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2021-11-24 20:07:44 +0100
committerMartin Haug <mhaug@live.de>2021-11-24 20:07:44 +0100
commit5677766715886e915609a999210c6125ea02f2e7 (patch)
treec32ee9ee30ace57a3ba8d5cbb494178fb1227f75 /src
parent0ad0fa5a0589b3dcd0838a18ff2202ad5a88c9e3 (diff)
Fix some comments
Diffstat (limited to 'src')
-rw-r--r--src/geom/linear.rs2
-rw-r--r--src/library/grid.rs8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/geom/linear.rs b/src/geom/linear.rs
index 494007b0..059528e9 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 c7e6b8e9..772a5620 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] {