vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: a0cb71c949534dc5117b9a58594c92f0c6f56d57
Parent: 571cbe49d74876c0b3fdd6142f2553613144871f
Author: Randy Palamar
Date:   Thu, 22 Aug 2024 08:07:34 -0600

set alpha on inverse cells better

Diffstat:
Mvtgl.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/vtgl.c b/vtgl.c @@ -293,9 +293,10 @@ push_cell(RenderPushBuffer *rpb, GLCtx *gl, Cell c, Rect r, f32 font_text_dy) rpb->charmap[idx + 1] = depth_idx; CellStyle cs = c.style; - /* TODO: what should this be if the cell is inverse? */ - if (cs.attr & ATTR_FAINT) - cs.fg.a = 0.5 * 255; + if (cs.attr & ATTR_FAINT) { + if (cs.attr & ATTR_INVERSE) cs.bg.a = 0.5 * 255; + else cs.fg.a = 0.5 * 255; + } rpb->texcolours[idx + 0].x = (cs.attr & ATTR_INVERSE)? cs.bg.rgba : cs.fg.rgba; rpb->texcolours[idx + 0].y = (cs.attr & ATTR_INVERSE)? cs.fg.rgba : cs.bg.rgba;