mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-14 14:22:39 +00:00
Properties: Text Frame section shows inset spacing and vertical justification (#2661)
* Properties: Text Frame section shows inset spacing and vertical justification Properties › Text Frame now shows the frame's inset spacing under the columns: Top and Bottom, a link that makes all four the same, then Left and Right. A non-rectangular frame shows one Inset, the distance its text keeps from the outline. Four buttons set Vertical Justification to Top, Center, Bottom or Justify. Type on a path shows neither. The section also shows with the Type tool in a frame. There it changes the frame that shows the insertion point, or every frame that holds part of the selected text, as Object › Text Frame Options does. * Properties: one Inset for a non-rectangular frame keeps the other sides The single Inset sets only the top inset, the one kept from the outline. A rectangular frame that holds part of the same selected text keeps its own sides. * Properties: the one Inset field and the composer share the frame outline test FrameOutline::of_item builds an item's outline with its corner options applied. The composer uses it to keep the top inset from the outline, and the Properties panel uses it to decide whether a frame shows one Inset, so the two give the same answer for every frame. * Text Frame Options: frames taken while typing stay with their document OK is refused when another document became active after the dialog opened, so the saved frame ids do not change frames in that document. * Properties: the inset link starts linked again after Revert The link's state is kept per document state instead of per document, so a frame with equal insets in the reverted document starts linked. * Text Frame Options: frames taken while typing are refused after Revert Revert keeps the document's id but replaces its state, so a new frame can reuse a saved frame id. The dialog now ties the frames to the document state, and OK is refused after Revert as it is in another document. * Properties: the one Inset of a non-rectangular frame sets all four sides The composer bounds a shaped frame's text by its rectangle less all four insets as well as by the outline, so a single Inset that changed only the top left hidden sides in place: lowering a uniform 96 pt inset to 0 kept text overset. When every frame the field changes is shaped, it now sets all four sides. With a rectangular frame among them, only the top inset changes and each frame keeps its other sides. * Fix text frame dialog merge resolution * Keep text frame preview targets fixed * Fix target field key inference * Tests: Text Frame Options show four sides for text through an oval and a rectangle With the Type tool and text selected through an oval and a threaded rectangle, with the oval as the caret's stored frame, the dialog shows the four inset sides, a changed Top leaves the rectangle's other sides as they were, and the link stays off while the rectangle's sides are uneven. * Properties: the inset link starts off when another frame has uneven sides With selected text that runs through several frames, the link of Text Frame > Inset Spacing started linked when the frame the section shows had four equal insets, and a changed Top then set all four sides of every frame. The link now starts linked only when every frame the field changes has four equal insets. Its state is kept for that set of frames, so a link turned on for one frame does not carry over to selected text that also runs through a frame with uneven sides. --------- Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
This commit is contained in:
1 parent
66b8c8ba3e
commit
5fb75aaefc
11 files changed
+496
-18
No files matched your search
@@ -353,6 +353,7 @@ It is evidence of breadth: each item exists. It is not a claim of InDesign-level
|
||||
- Auto-size (Text Frame Options › Auto-Size, `object.textFrameOptions {autoSize: off|heightOnly|widthOnly|heightAndWidth|heightAndWidthProportionally, autoSizeReference, useMinimumHeight, minimumHeight, useMinimumWidth, minimumWidth, noLineBreaks}`): the frame fits its text exactly after every edit (typing, pasting, style changes, option changes) in the same undo step (opening a file keeps the frame sizes it gives); it grows and shrinks around the reference point, which stays put in spread space for rotated frames too, never below the minimum height/width and never past 10,000 pt. Width Only and No Line Breaks set each paragraph on one line; Height and Width without No Line Breaks keeps the width; Keep Proportions scales both sides until the text fits. IDML keeps all the options (`AutoSizing…`, `…ForAutoSizing` attributes). Not covered: frames of a thread other than the last, vertical frames, type on a path, and multi-column balancing in Keep Proportions.
|
||||
- Balance Columns (Text Frame Options › Balance Columns, `object.textFrameOptions {balanceColumns}`, IDML `VerticalBalanceColumns`): in the frame the story ends in, the columns after the last explicit column break fill to about the same depth (the last may be shorter by a line per column); keep options hold, spanning and split paragraphs keep their own balancing, vertical justification then applies to each column as usual, and vertical frames balance their bands. A frame the text runs on from, or that is overset, fills normally.
|
||||
- Text Frame Options from the Type tool (Object › Text Frame Options…, Cmd+B, `object.textFrameOptions` without `ids`): with the insertion point in a frame, the options change the frame it is drawn in; with text selected, every frame that holds part of it. Options a frame already has add no undo step.
|
||||
- Properties › Text Frame (DesignCraft's own layout): columns and gutter; Inset Spacing with Top, Bottom, Left and Right and a link that makes all four the same (one Inset for a non-rectangular frame); four Vertical Justification buttons (Top, Center, Bottom, Justify); neither insets nor vertical justification for type on a path; Options opens Text Frame Options. With the Type tool in a frame the section shows too and changes the frame that shows the insertion point, or every frame that holds part of the selected text (`object.textFrameOptions {inset, verticalJustification}`).
|
||||
- Text Frame Options dialog, laid out as InDesign's (General, Column Rules, Baseline Options, Auto-Size; framed Columns, Inset Spacing and Vertical Justification groups with spinner fields; Fixed Number shows each column's width as the fields change). Preview shows the edits on the page until OK (one undo step) or Cancel. An invalid value (such as a gutter that isn't a measure) takes the preview off the page, so the frame shows as it was, and the dialog's status line gives the reason; OK refuses the value too. Preview stays checked and shows the edits again once the value is valid. Vertical Justification › Paragraph Spacing Limit (`object.textFrameOptions {paragraphSpacingLimit}`, IDML `VerticalThreshold`): with Justify, the extra space goes between paragraphs up to the limit, the rest between lines.
|
||||
- Text Frame Options › Inset Spacing for a non-rectangular frame (an oval, a polygon, a frame with corner options; when every selected text frame is one, a mixed selection keeps the four sides): Top, Left, Bottom, Right and the link are dimmed, and one Inset field sets the distance kept between the text and the frame's outline (`object.textFrameOptions {inset: <number>}`, all four sides).
|
||||
- Place a page of an IDML or DesignCraft document (`file.place {layoutPage}`): its objects, stories, styles and swatches as one group (INDD files are not readable).
|
||||
|
||||
Reference in new issue
Block a user