Two widths, one height — the symbol picker squares to 5:4, colour holds 6:4, and None's slash follows the swatch out of the grid
The owner's follow-up review on the shipped rectangles (Pipeline card 5004c540): height was close, so it stays exactly 2.1em on both controls; width now diverges by role via PickerRectMetrics.WidthRatio (color 1.5, symbol 1.25) instead of one shared multiplier. The symbol glyph gets a small em-derived inset back (SymbolGlyphControl.glyphInset) — a sliver of breath, not the old padded ring — applied to the face rect before sizing and fitting, still centred on the same midpoint. The collapsed colour swatch reuses ColorSwatchNoneStrike's own geometry to draw the popover's None slash whenever the stored value is nil or unresolvable, rather than sitting empty. Both mounting anchors (the card sidebar's side-by-side columns, the board popover beside the rename field) pick up .fixedSize() so the controls render at their own intrinsic size instead of stretching into whatever slack an HStack proposal leaves them. KanbanTests/SymbolCatalogTests.swift and ColorSwatchPickerTests.swift updated for the per-role widths, the shared-height claim, the glyph inset rule, and the None-face predicate.
This commit is contained in:
@@ -386,6 +386,15 @@ struct BoardInfoView: View {
|
||||
}
|
||||
)
|
||||
.disabled(!store.acceptsBoardMutations)
|
||||
// **Pinned to the control's own intrinsic size** (owner's 2026-08-10 follow-up on
|
||||
// Pipeline card 5004c540: the two pickers' ratios have to actually render, here
|
||||
// too). `SymbolGlyphView.sizeThatFits` honours any explicit finite width proposal
|
||||
// — right for a caller that wants to constrain it, but wrong beside
|
||||
// `BoardRenameField`'s flexible `TextField`: an `HStack` proposes each less-
|
||||
// flexible child a share of the row's *remaining* width before the field's own
|
||||
// turn, and without `.fixedSize()` the rectangle would happily accept whatever
|
||||
// share that is rather than holding its 5:4 ratio.
|
||||
.fixedSize()
|
||||
BoardRenameField(store: store)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user