fix(gui): map vaxis .default color to background color

This commit is contained in:
CJ van den Berg 2026-04-10 13:51:49 +02:00
parent 36ac002481
commit 80988915d6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 5 additions and 1 deletions

View file

@ -120,6 +120,10 @@ pub fn setBackground(color: RGBA) void {
global.background = color;
}
pub fn getBackground() RGBA {
return global.background;
}
// WindowState
pub const WindowState = struct {

View file

@ -373,7 +373,7 @@ fn maybeReloadFont(win_size: wio.Size, state: *gpu.WindowState, cell_width: *u16
fn colorFromVaxis(color: vaxis.Cell.Color) RGBA {
return switch (color) {
.default => .init(0, 0, 0, 255),
.default => gpu.getBackground(),
.index => |idx| .from_u24(@import("xterm").colors[idx]),
.rgb => |rgb| .from_u8s(rgb),
};