fix(gui): map vaxis .default color to background color
This commit is contained in:
parent
36ac002481
commit
80988915d6
2 changed files with 5 additions and 1 deletions
|
|
@ -120,6 +120,10 @@ pub fn setBackground(color: RGBA) void {
|
||||||
global.background = color;
|
global.background = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn getBackground() RGBA {
|
||||||
|
return global.background;
|
||||||
|
}
|
||||||
|
|
||||||
// ── WindowState ────────────────────────────────────────────────────────────
|
// ── WindowState ────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
pub const WindowState = struct {
|
pub const WindowState = struct {
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ fn maybeReloadFont(win_size: wio.Size, state: *gpu.WindowState, cell_width: *u16
|
||||||
|
|
||||||
fn colorFromVaxis(color: vaxis.Cell.Color) RGBA {
|
fn colorFromVaxis(color: vaxis.Cell.Color) RGBA {
|
||||||
return switch (color) {
|
return switch (color) {
|
||||||
.default => .init(0, 0, 0, 255),
|
.default => gpu.getBackground(),
|
||||||
.index => |idx| .from_u24(@import("xterm").colors[idx]),
|
.index => |idx| .from_u24(@import("xterm").colors[idx]),
|
||||||
.rgb => |rgb| .from_u8s(rgb),
|
.rgb => |rgb| .from_u8s(rgb),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue