summaryrefslogtreecommitdiff
path: root/src/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw.zig')
-rw-r--r--src/draw.zig16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/draw.zig b/src/draw.zig
index d299b03f..55fab141 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -752,8 +752,6 @@ fn renderHeaderLayer(p: *Pardes, layer: *pardes.Layer, kind: TagKind, id: u16, v
layer.context_rows = 0;
layer.bg = bg;
layer.cursor = null;
- layer.slide = 0;
- layer.fade = 1;
// A notice band carries a PANE id, not a column index, so it must not
// answer to the column being edited -- that would scroll and select
// its text with the column tag's offsets and give it a second caret.
@@ -870,8 +868,6 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r
layer.rows = rows;
layer.context_rows = 0;
layer.bg = if (p.window_pick == id) p.theme().sel_bg else if (active and p.settings.focus_tint) chrome.tag_active_bg else chrome.tag_bg;
- layer.slide = 0;
- layer.fade = 1;
layer.cursor = if (p.header_focus) null else if (temporary.cursor) |cursor|
.{ .x = cursor.x - TAG_TEXT_INSET, .y = cursor.y, .bar = cursor.bar }
else
@@ -892,7 +888,6 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r
/// grid's chip a copy of its right end, where its text is.
fn joinNotice(p: *Pardes, s: *Surface, arena: std.mem.Allocator, region: Region) !void {
const chrome = p.chromeTheme();
- const th = p.theme();
const id: usize = region.owner;
const pane = p.panes[id].?;
const i: usize = region.notice;
@@ -901,15 +896,10 @@ fn joinNotice(p: *Pardes, s: *Surface, arena: std.mem.Allocator, region: Region)
const chip = region.rect.w;
var leader_buf: [16]u8 = undefined;
const text = Messages.noticeText(p, pane, i, &leader_buf);
- // A message coming or going blends toward the page it sits on; a grid
- // cannot move it by less than a row, a pixel shell slides it too.
- const motion: Messages.MessageMotion = if (Messages.noticeLife(pane, i)) |life| Messages.messageMotion(p, life) else .{};
- const page = th.bg orelse chrome.tag_bg;
- const bg = colors.lerp(page, chrome.tag_bg, motion.alpha);
+ const bg = chrome.tag_bg;
// Where an exec was sent to a REPL reads in the tag's name tint, set
// apart from what the editor says.
- const ink = if (kind == .message and pane.msg_sent) chrome.tag_name_fg else chrome.tag_fg;
- const fg = colors.lerp(page, ink, motion.alpha);
+ const fg = if (kind == .message and pane.msg_sent) chrome.tag_name_fg else chrome.tag_fg;
// Nothing to say, or too narrow for a layer: a blank chip on the grid.
if (text.len == 0 or r.w <= TAG_TEXT_INSET) {
s.fill(region.rect.x, region.rect.y, chip, 1, .{ .bg = .{ .rgb = bg }, .font_role = .tagline });
@@ -941,8 +931,6 @@ fn joinNotice(p: *Pardes, s: *Surface, arena: std.mem.Allocator, region: Region)
@memcpy(line[pad..], kept);
const layer = &s.tag_layers[NOTICE_LAYER_BASE + id * Pane.Notices.max + i];
try renderHeaderLayer(p, layer, .notice, @intCast(id), region.rect, line, 0, bg, fg);
- layer.slide = motion.slide;
- layer.fade = motion.alpha;
// The caret rides the band, where the prompt's glyphs are.
if (kind == .prompt and id == p.active and pane.prompt != .del_side and pane.prompt != .repl_choice) caret: {
const typed = panes.File.displayWidth(text[0..@min(@as(usize, @intCast(@max(0, pane.input.cur_col))), text.len)]);