diff options
Diffstat (limited to 'src/draw.zig')
| -rw-r--r-- | src/draw.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/draw.zig b/src/draw.zig index ce5f86c1..b63f61d8 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -204,7 +204,7 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface { .border = chrome.border, .topbar_rule = config.gui_topbar_pane_border_rgb orelse chrome.border, .tag_bg = chrome.tag_bg, - .tag_focus_bg = if (p.settings.focus_tint) chrome.tag_active_bg else chrome.tag_bg, + .tag_focus_bg = chrome.tag_active_bg, .tag_fg = chrome.tag_fg, .scroll_track = chrome.scroll_track, .scroll_thumb = chrome.scroll_thumb, @@ -399,7 +399,7 @@ fn renderPane(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: // its ring. A pixel shell draws the ring (gui.zig gripDecor); a grid, // which cannot, marks dirty in the grip's second cell with a bold `*` // on the dirty colour, a cue that survives any palette. - const band = if (active and p.settings.focus_tint) chrome.tag_active_bg else chrome.tag_bg; + const band = if (active) chrome.tag_active_bg else chrome.tag_bg; const dirty = tagline.dirty(pane); const box_bg = gripBg(p, active); const box_style: CellStyle = .{ @@ -484,7 +484,7 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void { const column_rows = layout.columnBarHeight(p); if (column_rows > 0) for (0..p.ncol) |c| { const region = s.region(.column_tag, c) orelse continue; - const active = if (layout.findPane(p, p.active)) |found| found.col == c and p.settings.focus_tint else false; + const active = if (layout.findPane(p, p.active)) |found| found.col == c else false; const bg = if (active) chrome.tag_active_bg else chrome.tag_bg; const fg = if (active) chrome.tag_active_fg else chrome.tag_fg; if (p.col_x[c] < s.cols) { @@ -697,7 +697,7 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r if (p.window_pick == id) { for (0..rows) |row| temporary.tint(0, @intCast(row), temporary.cols, p.theme().sel_bg, p.theme().sel_fg); } - const tag_fg: Color = .{ .rgb = if (active and p.settings.focus_tint) chrome.tag_active_fg else chrome.tag_fg }; + const tag_fg: Color = .{ .rgb = if (active) chrome.tag_active_fg else chrome.tag_fg }; // One layer, a row to each line the tag shows. const layer = &s.tag_layers[id]; const count = @as(usize, columns) * rows; @@ -709,7 +709,7 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r layer.cols = columns; 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.bg = if (p.window_pick == id) p.theme().sel_bg else if (active) chrome.tag_active_bg else chrome.tag_bg; layer.cursor = if (p.header != null) null else if (temporary.cursor) |cursor| .{ .x = cursor.x - TAG_TEXT_INSET, .y = cursor.y, .bar = cursor.bar } else @@ -804,8 +804,8 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, 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. - const tag_bg = if (active and p.settings.focus_tint) chrome.tag_active_bg else chrome.tag_bg; - const tag_fg = if (active and p.settings.focus_tint) chrome.tag_active_fg else chrome.tag_fg; + const tag_bg = if (active) chrome.tag_active_bg else chrome.tag_bg; + const tag_fg = if (active) chrome.tag_active_fg else chrome.tag_fg; const tag_style: CellStyle = .{ .fg = .{ .rgb = tag_fg }, .bg = .{ .rgb = tag_bg }, .font_role = .tagline }; // Padding belongs to the same font row but keeps its default ink: a // role must not manufacture a foreground color for blank cells. @@ -855,7 +855,7 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, // wrapped onto. const first_line = whole[0 .. std.mem.indexOfScalar(u8, whole, '\n') orelse whole.len]; if (tagTintRange(pane, first_line, prefix_len)) |name| if (name.lo < name.hi) { - const name_fg = if (active and p.settings.focus_tint) chrome.tag_active_name_fg else chrome.tag_name_fg; + const name_fg = if (active) chrome.tag_active_name_fg else chrome.tag_name_fg; const a = modal.positionAt(shown.text, shown.fromReal(name.lo)); const b = modal.positionAt(shown.text, shown.fromReal(@min(name.hi, first_line.len))); var row = @max(a.row, top); @@ -1047,7 +1047,7 @@ test "a tag of three rows has its grip on the first, and band under it that stil const top = p.tagTop(pane, r); try std.testing.expect(pane.tag_rows >= 3); const chrome = p.chromeTheme(); - const band = if (p.settings.focus_tint) chrome.tag_active_bg else chrome.tag_bg; + const band = chrome.tag_active_bg; for (0..config.GUTTER) |dx| { const x = r.x + @as(u16, @intCast(dx)); try std.testing.expectEqual(Color{ .rgb = chrome.box }, s.at(x, top).style.bg); |
