summaryrefslogtreecommitdiff
path: root/core/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Core.zig')
-rw-r--r--core/Core.zig16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/Core.zig b/core/Core.zig
index 3a2e1f51..e727d27d 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -2571,21 +2571,23 @@ test "topbar hover highlights exactly the executable word" {
const hovered = try p.render(frame.allocator());
for (0..word.len) |col| {
const cell = hovered.at(word.at + @as(u16, @intCast(col)), 0);
- try std.testing.expectEqual(Color{ .rgb = p.theme().sel_bg }, cell.style.bg);
- try std.testing.expectEqual(Color{ .rgb = p.theme().sel_fg }, cell.style.fg);
+ // Hovered, the page's half selection (DESIGN.md B5), the word in
+ // its ink.
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().page.selection.secondary }, cell.style.bg);
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().page.word }, cell.style.fg);
}
- try std.testing.expectEqual(Color{ .rgb = p.chromeTheme().tag_bg }, hovered.at(word.at + word.len, 0).style.bg);
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().page.ground }, hovered.at(word.at + word.len, 0).style.bg);
p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = word.at + word.len, .row = 0 } });
_ = frame.reset(.retain_capacity);
const whitespace = try p.render(frame.allocator());
- try std.testing.expectEqual(Color{ .rgb = p.chromeTheme().tag_bg }, whitespace.at(word.at + 1, 0).style.bg);
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().page.ground }, whitespace.at(word.at + 1, 0).style.bg);
}
p.update(.pointer_leave);
_ = frame.reset(.retain_capacity);
const left = try p.render(frame.allocator());
- try std.testing.expectEqual(Color{ .rgb = p.chromeTheme().tag_bg }, left.at(words + 1, 0).style.bg);
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().page.ground }, left.at(words + 1, 0).style.bg);
}
test "pane-tag Exec prefers Term and argument builtins before shell fallback" {
@@ -2935,9 +2937,9 @@ test "an empty column shows its theme's empty_col under its tag: acme's white, e
defer arena.deinit();
const s = try p.render(arena.allocator());
const cell = s.at(p.view().col_x[1] + 3, p.view().screen_h - 2);
- const want = p.chromeTheme().empty_col;
+ const want = p.chrome().empty_column;
try std.testing.expectEqual(want, cell.style.bg.rgb);
- if (std.mem.eql(u8, name, "acme")) try std.testing.expectEqual([3]u8{ 0xff, 0xff, 0xff }, want) else try std.testing.expectEqual(p.chromeTheme().border, want);
+ if (std.mem.eql(u8, name, "acme")) try std.testing.expectEqual([3]u8{ 0xff, 0xff, 0xff }, want) else try std.testing.expectEqual(p.chrome().rule, want);
}
}