diff --git a/Architecture.md b/Architecture.md index 07fbd7c..e28f2ff 100644 --- a/Architecture.md +++ b/Architecture.md @@ -87,7 +87,12 @@ into the label. A `Dialog` (a question with buttons) takes Escape as its plain button, the one neither primary nor danger: Escape and Cancel lead back to the same place. Every label that can be wider than its control is cut with an ellipsis (`truncate` in - `Label.ts`, shared by `Label`, `ListRow` and `Button`). A `Button` keeps the full text and + `Label.ts`, shared by `Label`, `ListRow` and `Button`). Prose is the exception: a `Label` with + `wrap` breaks into lines at the width it gets, so a node's description and every inspector + note (`addNote`) show in full. Its height depends on that width, which `measure()` cannot + know. `Widget.heightFor(width)` answers it instead: `VStack` and `SectionStack` lay a column + out with it, and `ScrollContainer` asks once more at the narrower width when its scrollbar + shows. Every other widget answers with `measure().h`. A `Button` keeps the full text and measures from it — only what is drawn is shortened — and a subclass that puts something else inside the control takes its room off `labelSlot()`, so a long value is cut rather than run underneath the chevron. Given a `width`, a button is exactly that wide and truncates instead: