You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* build: add FlexRender.Xml to NuGet release pack list
* fix(layout): inset leaf content by padding+border and include trailing margin in auto-size (#10)
Two box-model bugs are fixed:
- Leaf padding now insets content on all sides. Layout already sized the
box as content + padding + border, but both renderers drew leaf content
into the full box, leaving padding only on the right/bottom. LayoutNode
now carries a ContentInset (padding + border per side) populated at each
leaf layout site; the Skia and ImageSharp renderers keep background and
border on the full box but draw content into the inset rect.
- A trailing child's bottom/right margin is now included in canvas/container
auto-size. The flex strategies store each child's resolved outer Right and
Bottom margins on LayoutNode, and CalculateTotalHeight/Width add them so
the last child's trailing margin is no longer clipped.
Adds a layout regression test for the trailing-margin auto-height and Skia
and ImageSharp snapshot tests proving leaf padding insets content on all
four sides. Regenerated flex_with_margin and ndc_receipt_composite goldens
(now taller by the previously dropped trailing margin).
* fix(svg): inset leaf content by padding+border in SvgRenderingEngine
The SVG rendering backend (WithSvg) was missed in the box-model fix that
corrected the Skia and ImageSharp renderers. Leaf content was drawn into the
full box, so padding/border was only applied on the right/bottom edges for
SVG/PNG output via the SVG backend.
Compute the content inset from node.ContentInset (padding+border per side)
and pass the inset cx/cy/cw/ch to every content draw call (text, separator,
image, svg, qr, barcode), keeping background and borders on the full box.
Add svg_leaf_padding_insets_content snapshot test verifying the background
rect stays on the full box while text is inset on all sides.
* fix: column-wrap flex container collapses to zero height without explicit height
A flex container with direction: column + wrap: wrap and no explicit
height collapsed to ~0 height, clipping all content. The wrapped
strategy only set the cross-axis auto dimension (width for column-wrap),
never the main-axis (height), and the engine skipped fallback
height calculation for all wrap containers.
- WrappedFlexLayoutStrategy now records resolved trailing margins
(MarginRight/MarginBottom) on wrap children so CalculateTotalHeight/
Width account for them, matching the non-wrap strategies.
- LayoutEngine computes auto height whenever the strategy left
node.Height unset (node.Height == 0f), covering no-wrap and
column-wrap; row-wrap already sets height and is skipped.
0 commit comments