mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 19:56:08 +03:00
renderer: render underline color if set
This commit is contained in:
@ -1023,11 +1023,13 @@ pub fn updateCell(
|
|||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const color = if (cell.attrs.underline_color) cell.underline_fg else colors.fg;
|
||||||
|
|
||||||
self.cells.appendAssumeCapacity(.{
|
self.cells.appendAssumeCapacity(.{
|
||||||
.mode = .fg,
|
.mode = .fg,
|
||||||
.grid_pos = .{ @intToFloat(f32, x), @intToFloat(f32, y) },
|
.grid_pos = .{ @intToFloat(f32, x), @intToFloat(f32, y) },
|
||||||
.cell_width = cell.widthLegacy(),
|
.cell_width = cell.widthLegacy(),
|
||||||
.color = .{ colors.fg.r, colors.fg.g, colors.fg.b, alpha },
|
.color = .{ color.r, color.g, color.b, alpha },
|
||||||
.glyph_pos = .{ glyph.atlas_x, glyph.atlas_y },
|
.glyph_pos = .{ glyph.atlas_x, glyph.atlas_y },
|
||||||
.glyph_size = .{ glyph.width, glyph.height },
|
.glyph_size = .{ glyph.width, glyph.height },
|
||||||
.glyph_offset = .{ glyph.offset_x, glyph.offset_y },
|
.glyph_offset = .{ glyph.offset_x, glyph.offset_y },
|
||||||
|
@ -1181,6 +1181,9 @@ pub fn updateCell(
|
|||||||
@enumToInt(sprite),
|
@enumToInt(sprite),
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const color = if (cell.attrs.underline_color) cell.underline_fg else colors.fg;
|
||||||
|
|
||||||
self.cells.appendAssumeCapacity(.{
|
self.cells.appendAssumeCapacity(.{
|
||||||
.mode = .fg,
|
.mode = .fg,
|
||||||
.grid_col = @intCast(u16, x),
|
.grid_col = @intCast(u16, x),
|
||||||
@ -1192,9 +1195,9 @@ pub fn updateCell(
|
|||||||
.glyph_height = underline_glyph.height,
|
.glyph_height = underline_glyph.height,
|
||||||
.glyph_offset_x = underline_glyph.offset_x,
|
.glyph_offset_x = underline_glyph.offset_x,
|
||||||
.glyph_offset_y = underline_glyph.offset_y,
|
.glyph_offset_y = underline_glyph.offset_y,
|
||||||
.fg_r = colors.fg.r,
|
.fg_r = color.r,
|
||||||
.fg_g = colors.fg.g,
|
.fg_g = color.g,
|
||||||
.fg_b = colors.fg.b,
|
.fg_b = color.b,
|
||||||
.fg_a = alpha,
|
.fg_a = alpha,
|
||||||
.bg_r = 0,
|
.bg_r = 0,
|
||||||
.bg_g = 0,
|
.bg_g = 0,
|
||||||
|
Reference in New Issue
Block a user