Commit Graph
38 Commits
Author SHA1 Message Date
aiongg cba374046d TextRuler: the decimal stop's dot at the size WordCraft draws it
Its radius was the thick stroke, about twice WordCraft's 1.1 pt, so the dots crowded the ruler.
2026-11-12 14:32:48 +00:00
aiongg 13221fd697 Collections take their width from content where their column gives none, and honour their pad
A collection that fills the width (Fill or FillWidth) follows the rule a
container does: where the enclosing body does not give its width (sized
from content, or a content column), a measuring run takes the width from
its content (header least width, else its largest row, at least its
ideal_width) and the column holds it across the width it settles on. A
FillWidth TabStrip or list in a dialog's column no longer sets the
column to the screen's width. Env::gives_width names the rule for both.

Collections honour ContainerProps::pad as containers do: the items hook
reports it (ShapeHooks::pad), the pass carries it in Resolved::pad, and
step 5, the measure view's room and step 7's content rect read the
padding through steps::padding. The header, rows, scroll bar and empty
text sit inside it; the surface covers the whole rect. #[container]
forwards pad, so Panel's own copy goes.

The spelling, file list and glyph wells are a List or TileGrid with
surface(Sunken).pad(Control); RelinkDialog's table is FillWidth.
2026-11-12 14:32:48 +00:00
aiongg 8703a667ba FooterBar: lay panel actions out from the reading end
The first action given sits at the end edge, as the old PanelFooter and
Photoshop's panel footers place them; a start group keeps its order.
Callers give their actions from the end edge: Layers, Channels,
Actions, Pages, the styles panel, the preset footer and MediaBin.
The filter gallery keeps Move Up and Move Down at the start edge.
LinkList's actions read as in the old: the menu at the start edge,
Relink at the end edge.
2026-11-12 14:32:48 +00:00
aiongg 9b22aa4e0f Fill propagates down a column whose width is given
A content-sized inline container shown in a `Stack` body given its width
passes that width on to its own body: its children measure and show as in
a given column, so a child that fills (a fill-width row, a list, a divider,
a picture, a side-labelled control) takes the width, and the container
takes what its content took. A content-sized mount (dialog, popover, menu),
a row, a grid or a held container stops it, so their bodies stay content
columns and measure as before.

The env carries the fact as `given_column`, set by a `Stack` body that is
not a content column and listed in the measure key's env facts. No pass,
record or measuring run is added.

Panel roots that set `fill_width()` only to span their pane now take the
default: CharacterControls, ParagraphControls, TimecodePanel,
ReorderableSections and BlendIfBar each hold a fill child, and where they
sit in a content column (BlendIfBar in the Layer Style page) the column
around them hugs them either way.

The fill_column trial shows the given column, nesting, a row stopping it,
the hug kept in a popover, and the measuring-run count against a
fill-width column.
2026-11-12 14:32:47 +00:00
aiongg e5188dd2bf NotesEditor: one paragraph layout for measure, hit testing and paint; the first line's text starts after a marker wider than its hanging indent 2026-11-12 14:32:47 +00:00
aiongg 280f5cbdf7 Wells: the spelling suggestions, the file list and the recently used glyphs in a sunken well, and the notes editor in the text well 2026-11-12 14:32:47 +00:00
aiongg 79c7732c40 NumberField: the unit follows the shown number, spaced as the language's unit template 2026-11-12 14:32:47 +00:00
aiongg d1afe97dc8 Select closed face: Entry::closed_label is the face's text while the list, type-ahead and accessible value keep the label; Select::picture draws an entry's thumbnail in its row and on the face, alone with picture_only; ConnectorBar and the stroke editor use it, TabStopsDialog shows the leader fill alone in the box and the Leader cell 2026-11-12 14:32:46 +00:00
aiongg 72561b52e2 Panel: no header unless titled, as a docked panel is named by its tab 2026-11-12 14:32:46 +00:00
aiongg 66b9f69fdb Build fixes: toggle_row takes the toggles by slice; drop TextColumns' unused length_row, the editor's unused Focus import and a trial's unused Show import 2026-11-12 14:32:45 +00:00
aiongg a706a9ddb6 TabStopsDialog: each row edits its stop in place (position field, alignment and leader Selects through ListRow::cell_field), as the old; the detail row under the table goes, and Set moves into the new row's position field 2026-11-12 14:32:45 +00:00
aiongg b537a04cc0 Validity::Error: a checked value that stands, read invalid with its message in the bad tone; TextColumns marks an out-of-range Number or Spacing field so, in place of the notices after it; the New Document preset name refusal uses it 2026-11-12 14:32:45 +00:00
aiongg e0d4068761 TextStylesPanel footer: Clear Override and Redefine at the start edge, the other actions at the end edge, through FooterBar::at_start 2026-11-12 14:32:45 +00:00
aiongg b48592be02 TextRuler: while Alt is held in a column border drag, each column's width shows between its borders, as the old 2026-11-12 14:32:45 +00:00
aiongg cef7d51cb6 TextEditor: the caret blinks for the whole session; in vertical text the formatting keys follow the flow; a formatting key the host does not take moves the caret as its arrow does 2026-11-12 14:32:45 +00:00
aiongg 65568b98e0 ParagraphControls: alignment and direction are rows of icon toggle buttons, each a Tab stop, as the old; a justify button on point text is disabled with its reason in the tooltip 2026-11-12 14:32:45 +00:00
aiongg 21051f8d27 Kerning field: the doc says what it shows for Metrics and Optical; a trial holds a named number value to its row label and the typed name 2026-11-12 14:32:45 +00:00
aiongg 3203b19882 FindBar: the count and the search progress write their numbers in the user's digits and groups 2026-11-12 14:32:45 +00:00
aiongg 26cfefbc0c HyperlinkDialog: each Link to option shows its icon between the radio and the label (globe, mail, bookmark), as the old 2026-11-12 14:32:45 +00:00
aiongg 0c31ce2889 Captions as the old dialogs showed them: Text Columns rows show Width and Spacing before their fields and Preview above the page preview; the toolbar drawer keeps a placed tool's shortcut and reports In toolbar as its description 2026-11-12 14:32:45 +00:00
aiongg 8fc8f79834 A glyph label can sit inside its control: FieldLayout::Inside puts it in the number field's leading slot as a scrub handle, every measure of the control sees it, and LinkedFields rows, the character panel's fields and the transform angle use it 2026-11-12 14:32:44 +00:00
aiongg f85dd3717c Status reporters report StatusMessage
The Vanishing Point editor's refused Stamp press, the text styles panel's caret hint, the screen picker's
capture failure and the swatches panel and menu report a StatusMessage for the host's status bar in place
of a String, a Label or a Toast.
2026-11-12 14:32:44 +00:00
aiongg fd2e9d2abb Footer buttons and media controls are Tab stops of their own; the text ruler is one Tab stop
FooterBar no longer makes its members one roving group, so each dialog or panel footer button is a Tab stop in
display order, as the old PanelFooter. Bar::tab_stops drops a bar's roving group; MediaControls uses it. The
TextRuler's markers, stops and column borders are one roving group whose Page keys move between them, as the
canvas guides; the arrows reach the ruler as nudges, and its own Page pick goes.
2026-11-12 14:32:42 +00:00
aiongg ac563d9eb3 Collections take a row range: min_rows and max_rows bound their height, and a capped one scrolls its rows; MissingFonts, TabStops, TextStyles and FieldList set theirs 2026-11-12 14:32:42 +00:00
aiongg 6a3cc54ed4 Rows drag only in their mode: TextStylesPanel rows drag while highlighting, and the toolbar drawer's tools already on the toolbar do not drag 2026-11-12 14:32:41 +00:00
aiongg 05080d1f80 fmt 2026-11-12 14:32:41 +00:00
aiongg dba0f0d3fa Dialog focus: the first field on open, the new tab stop after Set, the password field after reveal (K17)
A dialog opens on its first text or number field, else its default button, else nothing (Initial::FirstField, the
DIALOG policy's default). The per-dialog first-pass focus requests in Markers, Slice options and Page Setup go: the rule
gives the same field. focus::request reports whether it took effect, so a pending request outlives a measuring run.
2026-11-12 14:32:41 +00:00
aiongg d33abb64c6 FindReplace: the status line under the options, last in the body 2026-11-12 14:32:40 +00:00
aiongg 91fec0031d Side button columns in the dialogs that had them (K16)
FindReplace, Hyperlink, Paragraph, Check Spelling, Marker, the Contour editor, ListManager
and ParamDialog with a preview put their buttons in the side column. FormDialog takes extra
footer buttons (ResetFooter::extra, ResetPick::Extra) in place of hand-made buttons in
footer_extra; ParamDialog's Preview check box sits under the buttons. FileListPicker's
buttons stand beside the list through Stack::footer_beside, one width.
2026-11-12 14:32:40 +00:00
aiongg 939a80c85a Collection keys: type-ahead is a collection setting, off for lists
CollectionProps::type_ahead decides whether typed letters move the lead; the key role
reads it instead of turning type-ahead on for every collection, so a focused list leaves
single-letter tool keys to the app. Popup option lists, the hyperlink place list and the
gallery's component and token lists turn it on. The suite's type-ahead case runs where
the focused stop takes type-ahead.
2026-11-12 14:32:39 +00:00
aiongg e64dd901d9 Tooltips: a control that paints no label shows its own label, and the hints and names the old controls showed
A control whose own label is not painted (an icon, a glyph label, a caption-less tile, a chip, the stroke button) shows that label as its tooltip inside a field too; one named only by its field label shows none. Restores the old tooltips of the ReferencePoint points, the list disclosure, the PeopleBar avatars, the recent files, Distribute Rows Evenly, a page that failed to render, the font class mark (ListRow::trailing_named) and the Character hints (SideLabel::tooltip).
2026-11-12 14:32:39 +00:00
aiongg 8735a8b1c5 Document and app crates on the framework: text, pages, table, review, timeline, menu, browse, dialogs, print, font manager, theme store, update, automation 2026-11-12 14:32:38 +00:00
Dylan M. Taylor ce4f4816a1 text: a work limit on Knuth-Plass; past it break_paragraph falls back to greedy (#868) 2026-11-11 19:19:30 -05:00
Dylan M. Taylor d8568d6cfc text: keep hyphenation and line-breaking work linear and bounded (#560)
* text: keep hyphenation and line-breaking work linear and bounded

- hyphen::dict: inflate with a 64 MiB limit (MAX_INFLATED).
- hyphenate_word: walk the sorted break offsets with one iterator.
- patgen::score: index expected breaks once per word.
- patterns: FxHasher's finish rotates the multiplied bits down so packed
  keys sharing low bits spread over buckets; at most MAX_PATTERNS (1M).
- linebreak: Sums precomputes each item's next box or forced break,
  so next_start is a lookup instead of a scan per candidate.

* address review: refuse to serialize hyphenation dictionaries past the inflate limit
2026-11-03 23:04:30 -05:00
Dylan M. Taylor 6a66b95cbc Enforce Rust coding standards via Clippy (#372)
* chore(lints): enforce workspace Clippy standards

Deny cognitive_complexity (threshold 30, rust:S3776), too_many_arguments and wildcard_imports workspace-wide. Existing violations are fixed in follow-up commits.

* refactor(keymap): isolate shortcut row rendering

* test(ui): cover dock command contract cases

* fix(keymap): remove unused shortcut layout state

* refactor(media): simplify container serialization tests

* docs: document workspace lint inheritance for new crates

* refactor(text): split Knuth-Plass line costing and path extraction

Brings knuth_plass under the workspace cognitive complexity limit.

* test(font-store): split lookup test by concern
2026-10-27 13:49:38 -04:00
aiongg f4c6718d68 craft-text: a locale's script must match the hyphenation patterns' script 2026-10-26 01:54:26 +00:00
aiongg a04bb9da2a craft-text: locale codes with a script or year subtag; Slovak data through feature unification 2026-10-25 19:37:05 +00:00
aiongg acf6f79739 craft-text: hyphenation, line-break segmentation, bidi and line breaking 2026-10-25 19:08:20 +00:00