From 6f8960651ffac4b9858da2af09b16792923f0f4c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:20:56 -0300 Subject: body_layer: paintPointerSelection finds its pane's tag and body tops and its rows' insets itself (the tag's text inset, the body's gutter), where its six callers each passed in the same four values Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/draw.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/draw.zig') diff --git a/src/draw.zig b/src/draw.zig index bfcb8509..5b8377e0 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -1320,7 +1320,6 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, const tx = r.x + @min(TAG_TEXT_INSET, r.w); const tw = r.w -| TAG_TEXT_INSET; const tag_y = p.tagTop(pane, r); - const body_y = p.bodyTop(pane, r); const rows = pane.tag_rows; const page_rgb = th.bg orelse th.tag_bg; // Focus is visible along the tag without changing its live text grid. @@ -1426,12 +1425,12 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, for (pane.sel, 0..) |selection, button| { if (selection.state == .none or (selection.state == .done and button != 0)) continue; if (button != pardes.sel_slot or @min(selection.r0, selection.r1) >= rows) continue; - body_layer.paintPointerSelection(p, s, pane, r, tx, tw, tag_y, body_y, selection, 0, th.tag_sel_bg orelse th.sel_bg, th.sel_fg); + body_layer.paintPointerSelection(p, s, pane, r, selection, 0, th.tag_sel_bg orelse th.sel_bg, th.sel_fg); } if (p.look_hover_preview) |preview| { if (preview.pane == id and preview.serial == pane.serial) if (preview.sel) |sel| if (@min(sel.r0, sel.r1) < rows) { const preview_bg = colors.mix(page_rgb, colors.mix(page_rgb, th.sel_bg)); - body_layer.paintPointerSelection(p, s, pane, r, tx, tw, tag_y, body_y, sel, 0, preview_bg, null); + body_layer.paintPointerSelection(p, s, pane, r, sel, 0, preview_bg, null); }; } const sel_btn = body_layer.buttonTints(th); @@ -1439,7 +1438,7 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, for (pane.sel, 0..) |selection, button| { if (selection.state == .none or (selection.state == .done and button != 0)) continue; if (button == pardes.sel_slot or @min(selection.r0, selection.r1) >= rows) continue; - body_layer.paintPointerSelection(p, s, pane, r, tx, tw, tag_y, body_y, selection, 0, sel_btn[button], sel_ink[button]); + body_layer.paintPointerSelection(p, s, pane, r, selection, 0, sel_btn[button], sel_ink[button]); } } -- cgit v1.3