You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflow drawn setting choices instead of clipping their labels (#79)
The drawn choices added in #73 — Pen button, Toolbar position, Toolbar
layout —
were clipped when the Preferences dialog was narrowed. Toolbar /
Position is the
one that showed it: five options in a row, and at the dialog's 560 px
minimum
each segment holds about 52 px inside its padding, against the ~44 px
"Bottom"
needs. A word too long for its line overflows and is clipped rather than
wrapped,
and `TextTrimming` does not help because it applies only when the height
is
constrained — so the label read as a different word, "Bottor right".
## The row reflows
The choices now sit in a small panel that measures and arranges its own
children,
taking its column count from the width the row actually occupies. Five
choices
stay in one row when there is room and fall to 4+1 and then 3+2 as the
dialog
narrows, rather than shrinking past legibility.
Two earlier attempts are worth recording, because both looked right and
neither
was. Recomputing on `SizeChanged` only fires when the width changes, so
the count
settled during the first layout pass stood for the life of the dialog.
Moving it
to `MeasureOverride` fixed the staleness but not the cause: the width a
row is
measured against arrives far narrower than the width it is finally
given, so the
count was still computed against a width the row never had.
`ArrangeOverride` has
the real width, and that is what it now reads.
## The samples scale
Each sample is wrapped in a down-only `Viewbox`, so it draws at its
designed size
when there is room and shrinks with the column instead of overflowing
and losing
its edges. The segment template honours `HorizontalContentAlignment` so
the label
is given the width it is measured against, and the padding drops from
`10,12` to
`6,12`.
Version 1.1.4. Release build clean with `TreatWarningsAsErrors`, smoke
tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments