From 0de2e7f04977b22df3f7b6ab1690eb8a6c905cd4 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 13:57:28 -0300 Subject: Paint tags, notices and headers once, and join them into the grid A pane's tag rows, each notice chip and the workspace and column tags are painted once, as their tag layers, and the grid's cells for them are copies of those layers (joinCells): the second paint of every tag, the grid's own notice pass and paintHeaders' grid text, hover, selection and caret are gone, and so is renderTagLayers. The grid's caret for a tag, a header or a prompt is the layer's, projected to grid columns. A wide glyph cut by the edge of the copy is left as the band's blank, as the grid's print never drew half of one (a test proves it, and fails without the re-clip). Where the two copies disagreed, the grid's behaviour is kept, so every snapshot golden is byte-identical: - a notice highlighted the hovered word only as a layer; now it never does; - a column tag's hover was suppressed during a column move only on the grid; now in both; - a header under edit showed the hovered word only on the grid; now in both, under the selection; - a notice's leading padding carried the band's ink only as a layer; the grid copy keeps it blank; - a notice whose band is wider in tagline pitch than in grid cells (a GUI core) now shows the band's right end on the grid, where its text is, and its prompt caret there. A sweep begun on a tag and dragged into the body still shows on the body rows it crossed, on the grid only (paintPointerSelection's from_row). --- src/surface.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/surface.zig') diff --git a/src/surface.zig b/src/surface.zig index b19c24c7..fec43e30 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -357,7 +357,9 @@ pub const Region = struct { /// The pane or column has the keyboard's focus. active: bool = false, /// A rail's thumb: rows from the rail's top, and how many. Zero rows is - /// a rail with no thumb (an image). + /// a rail with no thumb (an image). A native PDF's thumb is measured in + /// document pixels and filled in by Pdf.draw while it paints, so read + /// regions once render has returned. thumb_y: u16 = 0, thumb_h: u16 = 0, /// A notice's index in its pane's `notices`. -- cgit v1.3