diff options
Diffstat (limited to 'anim/src/calls.zig')
| -rw-r--r-- | anim/src/calls.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/anim/src/calls.zig b/anim/src/calls.zig index d78c26c..4a669f3 100644 --- a/anim/src/calls.zig +++ b/anim/src/calls.zig @@ -45,8 +45,9 @@ pub const Tree = struct { for (nodes) |n| leaves = @max(leaves, n.x + 1); // The caller's box left of the root on its level; the leaves spread over the rest. const caller_room = m.caller[0] + 48; - const pitch = (body.w - 2 * theme.metric.panel.pad_x - 2 * m.radius - caller_room) / @max(leaves - 1, 1); const left = theme.metric.panel.pad_x + caller_room + m.radius; + // The last leaf's centre 69 in from the drawing's right edge: room for its badge on its shoulder. + const pitch = (box.w - 69 - left) / @max(leaves - 1, 1); const top = body.y + m.root; const since = now.since(.idea, 0); const returned = now.walking() and rec.depths[now.stops[0]] < rec.depths[now.stops[1]]; @@ -122,7 +123,8 @@ pub const Tree = struct { const badge: Rect = .{ .x = c[0] + m.badge_at[0], .y = c[1] - m.badge_at[1], .w = m.badge, .h = m.badge }; const heat: ui.Heat = if (n.call.exit.? > now.stops[1]) now.heat(0, null, since - time.badge_after) else .none; const ink = u.cellWritten(badge, heat, theme.color.page); - if (heat.level < 1) u.frame(badge, t.faint, theme.stroke.rule); + // Framed, as every result is, but while the strike's paper is on it. + u.faded(if (heat.level < 1) 1 else 1 - heat.solid * heat.in).frame(badge, t.faint, theme.stroke.rule); u.label(ink.face, size, badge, .center, u.print("{d}", .{@as(i64, @bitCast(n.call.result))}), if (heat.level >= 1) ink.ink else ui.rgb(t.primary)); } } |
