Commit Graph
7 Commits
Author SHA1 Message Date
FredApps 83cbf8f89f Merge pull request #5476 from KenM76/fix/xfa-check-button-width
M12: an XFA check box without a width is as wide as its box and caption
2026-11-04 18:53:31 +01:00
Grzegorz MartensandClaude Opus 5.5 2afbf55cd2 M12: an XFA draw placed by position turns about its anchor
Nothing read rotate, so a turned line, picture or label was drawn as if it
stood upright: part of #5561. XFA gives the angle in degrees counter-clockwise
about the anchor, and Acrobat's flattened page for that issue's form puts the
three turned lines exactly there, which the test holds it to.

A turned draw is one item: a page break moves it whole, and what it holds is
written unturned under one matrix, so text, pictures and borders need nothing
of their own. The page count and link annotations look inside it, and its
container grows to the box it stands in. Fields, subforms and draws in a flow
don't turn yet.

That issue's own form is static, so it already shows Acrobat's page: this is
for dynamic forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-01 02:59:32 +01:00
KenM76andClaude Opus 5.5 56ebc5f926 M12: pin a check box's content width and flowed packing
Review follow-up. The radio-choice test only reached the minW clamp, so
a wrong content formula would still pass. A check box with a reserved
caption and no width or minW now must be exactly reserve + box, both
positioned (its right-aligned box ends the field) and flowed (two pack
side by side in an lr-tb row). Each assertion fails with the measure.rs
change reverted: the box lands at 530pt, and the second flowed check box
drops to the next row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 14:40:19 -04:00
KenM76andClaude Opus 5.5 bb4a8accdd M12: an XFA check box without a width is as wide as its box and caption
A field with no `w` is growable in width (XFA 3.3 Ch.8, growable
objects): it takes its content's width, clamped to minW/maxW. The
layouter gave every non-button field without a width all the room left
in its container, so a positioned radio group whose choices set only
minW stretched the first choice to the group's right edge. Its box
(drawn at the field's right end) then sat on the last choice's box, and
the group showed one circle where it had two (#5442's Yes/No groups).

A check button without a width is now its box and widget margins plus
its caption beside it (the caption's reserve, else its text), or the
wider of the two when the caption is above or below, within what is
available and clamped by minW/maxW. Other fields keep taking the
available width.

Test: a_radio_choice_without_a_width_is_as_wide_as_its_content, two
choices with minW and no w in a positioned exclGroup; with the change
reverted the Yes box lands at 105.2pt, on top of the No box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-30 14:28:05 -04:00
Dylan M. Taylor 9530dbb3e8 Refactor xfa for strict Clippy checks 2026-10-27 23:12:52 +00:00
aiongg f022ef0671 style: cargo fmt on moved files 2026-10-27 00:34:32 +00:00
aiongg 3da49321f2 refactor(xfa): split layout.rs into layout/
New modules: items, helpers, pages, flow, measure, draw, field.
2026-10-26 22:18:50 +00:00