mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-15 08:21:03 -04:00
render.c: fix alpha_mode logic
This commit is contained in:
parent
155c7c96b7
commit
b1635ec997
1 changed files with 4 additions and 17 deletions
21
render.c
21
render.c
|
|
@ -745,24 +745,11 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
|||
}
|
||||
|
||||
if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) {
|
||||
switch (term->conf->colors.alpha_mode) {
|
||||
case ALPHA_MODE_DEFAULT: {
|
||||
if (cell->attrs.bg_src == COLOR_DEFAULT) {
|
||||
alpha = term->colors.alpha;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ALPHA_MODE_MATCHING: {
|
||||
if (cell->attrs.bg == term->colors.bg)
|
||||
alpha = term->colors.alpha;
|
||||
break;
|
||||
}
|
||||
|
||||
case ALPHA_MODE_ALL: {
|
||||
if (term->conf->colors.alpha_mode == ALPHA_MODE_ALL) {
|
||||
alpha = term->colors.alpha;
|
||||
} else if (cell->attrs.bg_src == COLOR_DEFAULT ||
|
||||
(term->conf->colors.alpha_mode == ALPHA_MODE_MATCHING && cell->attrs.bg == term->colors.bg)) {
|
||||
alpha = term->colors.alpha;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue