diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/gui/gui.zig | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig index bdbd7880..5d1dc03a 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -4893,7 +4893,7 @@ fn buildDecor(g: *Gui, gpa: std.mem.Allocator, surface: *const pardes.Surface, g else => {}, } else false; if (grid_bottom < win_h and tag_last) try addDecor(g, gpa, 0, grid_bottom, win_w, win_h, chrome.tag_bg, 1, win_w, win_h); - try paneDecor(g, gpa, regions, surface.rail_ticks[0..surface.nrail_ticks], chrome, layout, surface.cols, surface.rows, win_w, win_h); + try paneDecor(g, gpa, regions, surface.rail_ticks[0..surface.nrail_ticks], surface.heat.items, chrome, layout, surface.cols, surface.rows, win_w, win_h); // The changes' lanes (jj.paint): a strip a level in the gutter's // lane cells, each a third of a cell wide with half that of air // before it, so three take one and a half cells (the ruled @@ -4936,7 +4936,7 @@ fn buildDecor(g: *Gui, gpa: std.mem.Allocator, surface: *const pardes.Surface, g /// Each pane's rule between its tag and body, and its scroll rail: a page /// coloured gutter with a thin track and its thumb, running down through the /// pixels past the last whole row. -fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ticks: []const pardes.RailTick, chrome: *const pardes.Chrome, layout: CellLayout, cols: u16, rows: u16, win_w: f32, win_h: f32) !void { +fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ticks: []const pardes.RailTick, heat: []const pardes.RailHeat, chrome: *const pardes.Chrome, layout: CellLayout, cols: u16, rows: u16, win_w: f32, win_h: f32) !void { const page = chrome.page orelse bg_default; for (regions) |rail| { if (rail.kind != .rail or rail.rect.h == 0) continue; @@ -5015,6 +5015,14 @@ fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ti const ty = y0 + std.math.clamp(at * track_px, 0, track_px - h); try addDecor(g, gpa, column[0], ty, column[1], ty + h, if (tick.current) chrome.match_current else chrome.match_tick, 1, win_w, win_h); }; + // Churn's strip (jj.railHeat): beside the track, at the rail's + // right edge, a rail row each. + const strip_x1 = x0 + @as(f32, @floatFromInt(config.GUTTER)) * layout.w - dp(1); + const strip_x0 = @max(column[1], strip_x1 - dp(2)); + for (heat) |h| if (h.owner == rail.owner and h.row < rail.rect.h) { + const hy = y0 + @as(f32, @floatFromInt(h.row)) * layout.h; + try addDecor(g, gpa, strip_x0, hy, strip_x1, hy + layout.h, h.rgb, 1, win_w, win_h); + }; } } |
