mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: fix inversed cursor fg color when alpha != 1.0, take #2
No need to check if terminal colors have been reversed - this is done by the cell rendering logic. This hopefully fixes all remaining issues with invisible text when background alpha < 1.0
This commit is contained in:
parent
7a43737745
commit
8a849b4b08
1 changed files with 5 additions and 6 deletions
11
render.c
11
render.c
|
|
@ -419,14 +419,13 @@ cursor_colors_for_cell(const struct terminal *term, const struct cell *cell,
|
|||
}
|
||||
} else {
|
||||
*cursor_color = *fg;
|
||||
*text_color = *bg;
|
||||
|
||||
if (unlikely(text_color->alpha != 0xffff)) {
|
||||
/* We *know* this only happens when bg is the default bg
|
||||
* color */
|
||||
*text_color = color_hex_to_pixman(
|
||||
term->reverse ^ is_selected ? term->colors.fg : term->colors.bg);
|
||||
} else
|
||||
*text_color = *bg;
|
||||
/* The *only* color that can have transparency is the
|
||||
* default background color */
|
||||
*text_color = color_hex_to_pixman(term->colors.bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue