fix(panel): make the panel's right padding match its left #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/right-padding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Correct, and #23 is what caused it. Measured on the running panel before this
change:
Why #23 did that
#23 gave every block on the right one edge by widening the column with the
scrollbar's strip (
RIGHT_W = CONTENT_W + 4 + 14= 323) and paying for it inplugin.toml'swidth(578 → 596). That put the strip in the padding.Everything outside the column is already symmetric — the shell insets a
decorated panel by
Style::panelPadding(14) a side, and the root row adds itsown 4 — so any width the column carries beyond its content lands in the
right-hand gap and doubles it.
The fix
The column is its content, and the strip comes out of the scroll:
plugin.toml'swidthgoes back to 578. The chart is untouched.Verified on screen
Panel spans x=671..1249 (578 wide, as declared):
Both guides in the screenshot sit the same distance from their borders: the left
one touches the title, the card and the chips; the right one touches the chart's
last bar, the search field and the scope total.
The one thing that does not reach the shared edge
The history rows. This is forced, not chosen — the strip has to come out of some
node's width and the scroll is the only candidate:
ScrollView::m_viewportPaddingH(4 px) is unreachable from the plugin whitelistthe list starts scrolling (
m_scrollbarShownflips at that exact row count,scroll_view.cpp:429)So the list reads as indented under its own chrome, and the durations end 18 px
short of the total above them. The alternative is 18 px of dead air down the
panel's right edge, which is what this PR removes.
If you would rather the durations reached the edge, dropping
SCROLLBAR_GUTTERfromLIST_Wgets them to 4 px short instead of 18 — at thecost of the scrollbar painting over the duration column whenever the list
scrolls. One-line change; say so and I will make it.
Suite
17 states, 2358 field comparisons/ok; lint0 errors, 0 warnings.The padding claim is now pinned directly:
scrollNode().props.width == chromeW,i.e. the content's right edge is the column's. The row's inset is pinned as a
decision (
rowW == chromeW - 2 * INSET - GUTTER) rather than left as whateverfell out.
10 mutations, no survivors — including
P1, re-widening the column by the strip,which is exactly the regression this fixes, and
P4, dropping the gutterreservation.