diff options
Diffstat (limited to 'core/Kind.zig')
| -rw-r--r-- | core/Kind.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/Kind.zig b/core/Kind.zig index 4841a55c..ffea8aa3 100644 --- a/core/Kind.zig +++ b/core/Kind.zig @@ -442,9 +442,9 @@ pub fn close(p: *Pardes, pane: *Pane) void { pub fn draw(p: *Pardes, s: *surface.Surface, arena: std.mem.Allocator, pane: *Pane, id: usize, x: u16, y: u16, cols: u16, rows: u16) bool { const slot = pane.addon orelse return true; if (cols == 0 or rows == 0) return true; - const th = p.theme(); - const fg: surface.Color = if (th.fg) |f| .{ .rgb = f } else .default; - const bg: surface.Color = if (th.bg) |b| .{ .rgb = b } else .default; + const chrome = p.chrome(); + const fg: surface.Color = if (chrome.host_page) .default else .{ .rgb = chrome.page.text }; + const bg: surface.Color = if (chrome.host_page) .default else .{ .rgb = chrome.page.ground }; var frame: Frame = .{ .cols = cols, .rows = rows }; if (slot.ops == null and slot.live) { // A client: a plain kind runs where it is shown, and this one lacks @@ -791,7 +791,7 @@ pub fn viewOf(p: *const Pardes, k: u8, id: usize) c.pa_view { // Its bands made again, never the copy a step or a park left: they are // derived, so a client joined from a dump has none. const notices = pardes.Messages.bands(p, pane, tag_rows, r).span(); - const th = p.theme(); + const chrome = p.chrome(); const rgb = struct { fn f(x: [3]u8) u32 { return @as(u32, x[0]) << 16 | @as(u32, x[1]) << 8 | x[2]; @@ -803,10 +803,10 @@ pub fn viewOf(p: *const Pardes, k: u8, id: usize) c.pa_view { .rows = (r.h -| tag_rows) -| notices, .cell_w = v.cell_pixels.w, .cell_h = v.cell_pixels.h, - .fg = rgb(th.fg orelse th.tag_fg), - .bg = rgb(th.bg orelse th.tag_bg), - .sel = rgb(th.sel_bg), - .link = rgb(th.box), + .fg = rgb(chrome.page.text), + .bg = rgb(chrome.page.ground), + .sel = rgb(chrome.page.selection.ground), + .link = rgb(chrome.page.key), .dpi = policy.dpi, .max_px = policy.max_dimension, .fill = @intFromBool(policy.match_viewport), |
