Stop section headers rendering clipped at the top of a list
JetBrainsMono Nerd Font draws 10% of the em above the ascent Text reserves for it (yMax 1120 against ascent 1020), and a patched or user-chosen family can be worse. In normal flow that sliver costs nothing; at the top of a clipping list it is sliced off and the header renders beheaded. Reserving it in PanelSectionHeader covers every panel at once, rather than each list working around it in its own geometry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
David Heinemeier Hansson
co-authored by
Claude Opus 5
parent
39936d2982
commit
1045975946
@@ -15,4 +15,12 @@ Text {
|
||||
font.family: fontFamily
|
||||
font.pixelSize: fontSize
|
||||
font.bold: true
|
||||
|
||||
// Glyphs can paint above the box Text reserves for them: JetBrainsMono Nerd
|
||||
// Font's outlines run 10% of the em past its own ascent, and a patched or
|
||||
// user-chosen family can be worse. That sliver is invisible in normal flow,
|
||||
// but a header sitting at the top of a clipping list — bluetooth's device
|
||||
// list, network's station list — loses it to the clip and renders beheaded.
|
||||
// Reserve the overshoot here so every panel is covered at once.
|
||||
topPadding: Math.ceil(fontSize * 0.15)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user