Give each calculator column its own scroller, and let all three grow - #8
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ScrollViewerwrapped 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
FILETIMEbroke 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.
ScrollViewerthat 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.Window minimum
MinWidthmoves 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