mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
render: only apply transparency to the default background color
This commit is contained in:
parent
0c9b679958
commit
b647aa447b
2 changed files with 9 additions and 2 deletions
|
|
@ -15,7 +15,12 @@
|
||||||
* `Sync` to terminfo. This is a tmux extension that indicates
|
* `Sync` to terminfo. This is a tmux extension that indicates
|
||||||
_"Synchronized Updates"_ are supported.
|
_"Synchronized Updates"_ are supported.
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* Background transparency to only be used with the default background
|
||||||
|
color.
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
6
render.c
6
render.c
|
|
@ -390,7 +390,8 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
_fg = _bg;
|
_fg = _bg;
|
||||||
|
|
||||||
pixman_color_t fg = color_hex_to_pixman(_fg);
|
pixman_color_t fg = color_hex_to_pixman(_fg);
|
||||||
pixman_color_t bg = color_hex_to_pixman_with_alpha(_bg, term->colors.alpha);
|
pixman_color_t bg = color_hex_to_pixman_with_alpha(
|
||||||
|
_bg, _bg == term->colors.bg ? term->colors.alpha : 0xffff);
|
||||||
|
|
||||||
if (cell->attrs.dim)
|
if (cell->attrs.dim)
|
||||||
color_dim(&fg);
|
color_dim(&fg);
|
||||||
|
|
@ -502,7 +503,8 @@ render_margin(struct terminal *term, struct buffer *buf, int start_line, int end
|
||||||
const int line_count = end_line - start_line;
|
const int line_count = end_line - start_line;
|
||||||
|
|
||||||
uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg;
|
uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg;
|
||||||
pixman_color_t bg = color_hex_to_pixman_with_alpha(_bg, term->colors.alpha);
|
pixman_color_t bg = color_hex_to_pixman_with_alpha(
|
||||||
|
_bg, _bg == term->colors.bg ? term->colors.alpha : 0xffff);
|
||||||
if (term->is_searching)
|
if (term->is_searching)
|
||||||
color_dim(&bg);
|
color_dim(&bg);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue