Skip to content

Give each calculator column its own scroller, and let all three grow - #8

Merged
donislawdev merged 1 commit into
mainfrom
fix/calculator-layout
Sep 8, 2026
Merged

Give each calculator column its own scroller, and let all three grow#8
donislawdev merged 1 commit into
mainfrom
fix/calculator-layout

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

The calculator screen was measured at 1560 x 1200 - the size this window is actually used at, rather than the 1040 x 800 it opens with - and the preset list ran 938 px below the bottom of the window.

What was wrong

One ScrollViewer wrapped all three columns, so the tallest one decided for everybody. Reaching the last preset pushed the result and the builder off screen, and what a user saw was the top of everything and the bottom of nothing. Half the result formats sat below the fold.

Nothing overflowed sideways, so the horizontal scrollbar on that screen was the wrong thing to look at.

Two of the three columns were pinned at 250 and 320. Every extra pixel of a wide window therefore went to the middle column - the emptiest one - while the result column stayed at 320 however wide the window got. That is why a FILETIME broke in the middle of its digits.

What it does now

Each column scrolls inside its own card. Widths are proportions with a floor, so all three grow. All eight formats are visible and the number is on one line.

The start-point row was a horizontal stack, which hands every child its full desired width and clips whatever does not fit - the zone read UTC+02:00 - this m. It is a grid now, and the zone has a row of its own, because sharing one meant inheriting the width of the box above it. It reads in full.

No logic moved. Colours, spacing and type still come from the theme.

Three attempts, each corrected by a render

Worth recording, because none of this is visible in the widget tree and no test would have caught it.

  1. Keeping the outer scroller. A ScrollViewer that offers horizontal scrolling measures its child at infinite width, and a star column measured against infinity has no share to take, so it degenerates to content width. The presets column grew to about 1250 px and the result column left the window entirely.
  2. Binding the grid to the viewport. Closer, and still 12 px too wide, which clipped the copy buttons.
  3. Removing the scroller. A grid sitting directly in the row has a real width to divide. This is why the window now carries a floor wide enough for three columns - an honest constraint rather than a scrollbar apologising for a layout that cannot fit.

Window minimum

MinWidth moves from 640 to 1000. Three columns do not fit in 640, and the previous answer to that was a horizontal scrollbar over a layout that had already collapsed.

🤖 Generated with Claude Code

…hree grow

Measured at 1560 x 1200, the size this window is actually used at rather than the 1040 x
800 it opens with: the preset list ran 938 px below the bottom of the window. One shared
scroller wrapped all three columns, so the tallest decided for everybody - reaching the
last preset pushed the result and the builder off screen, and what a user saw was the top
of everything and the bottom of nothing. Nothing overflowed sideways, which is why looking
at the horizontal scrollbar was looking at the wrong thing.

Each column now scrolls inside its own card. Widths became proportions with a floor:
two of the three were pinned at 250 and 320, so every extra pixel of a wide window went to
the middle column, the emptiest one, while the result column stayed at 320 however wide the
window got. That is why a FILETIME broke in the middle of its digits and half the formats
were cut off below the fold. All eight are visible now and the number is on one line.

Three attempts, each corrected by looking at a render rather than at the tree:

The first kept the outer scroller. A ScrollViewer offering horizontal scrolling measures
its child at infinite width, and a star column measured against infinity has no share to
take, so it degenerates to content width: the presets column grew to about 1250 px and the
result column left the window. The second bound the grid to the viewport, which still left
it 12 px too wide and clipped the copy buttons. The third removed the scroller, which is
why the window now carries a floor wide enough for three columns - an honest constraint
rather than a scrollbar apologising for a layout that cannot fit.

The start-point row was a horizontal stack, which hands every child its full desired width
and clips what does not fit: the zone read "UTC+02:00 - this m". It is a grid now, and the
zone has a row of its own, because sharing one meant inheriting the width of the box above
it. It reads in full.

No logic moved. Colours, spacing and type still come from the theme.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@donislawdev
donislawdev merged commit 286a53b into main Sep 8, 2026
8 checks passed
@donislawdev
donislawdev deleted the fix/calculator-layout branch September 8, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant