diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:20:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:21:29 -0300 |
| commit | 6f8960651ffac4b9858da2af09b16792923f0f4c (patch) | |
| tree | 38f74e254d072a15f90c58e2b7f452c46ff7835f /src/draw.zig | |
| parent | 56b459e0aae62760481300aff8d4262e35c3b428 (diff) | |
| download | pardes-6f8960651ffac4b9858da2af09b16792923f0f4c.tar.gz pardes-6f8960651ffac4b9858da2af09b16792923f0f4c.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/draw.zig')
| -rw-r--r-- | src/draw.zig | 7 |
1 files changed, 3 insertions, 4 deletions
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]); } } |
