M2: auto layout: wrapped-line alignment

This commit is contained in:
bflatastic
2026-10-13 13:36:54 +07:00
committed by BFlat
parent 1667b7bc91
commit a2a0f80252
19 changed files with 455 additions and 38 deletions
+2 -1
View File
@@ -550,7 +550,8 @@ fn auto_layout(doc: &Document, n: &Node, l: &AutoLayout) -> Section {
rows.push(prop("Gap", gap).token(variable(doc, n, "gap")));
if l.wrap {
let label = if l.mode == LayoutMode::Vertical { "Column gap" } else { "Row gap" };
rows.push(prop(label, num(l.cross_gap)).token(variable(doc, n, "crossGap")));
let spread = l.content_align == ContentAlign::SpaceBetween;
rows.push(if spread { prop(label, "Auto (space between)") } else { prop(label, num(l.cross_gap)).token(variable(doc, n, "crossGap")) });
}
}
let [t, r, b, lft] = l.padding;