mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-16 08:21:20 -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
19
render.c
19
render.c
|
|
@ -745,24 +745,11 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) {
|
if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) {
|
||||||
switch (term->conf->colors.alpha_mode) {
|
if (term->conf->colors.alpha_mode == ALPHA_MODE_ALL) {
|
||||||
case ALPHA_MODE_DEFAULT: {
|
|
||||||
if (cell->attrs.bg_src == COLOR_DEFAULT) {
|
|
||||||
alpha = term->colors.alpha;
|
alpha = term->colors.alpha;
|
||||||
}
|
} else if (cell->attrs.bg_src == COLOR_DEFAULT ||
|
||||||
break;
|
(term->conf->colors.alpha_mode == ALPHA_MODE_MATCHING && cell->attrs.bg == term->colors.bg)) {
|
||||||
}
|
|
||||||
|
|
||||||
case ALPHA_MODE_MATCHING: {
|
|
||||||
if (cell->attrs.bg == term->colors.bg)
|
|
||||||
alpha = term->colors.alpha;
|
alpha = term->colors.alpha;
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ALPHA_MODE_ALL: {
|
|
||||||
alpha = term->colors.alpha;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue