mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-02 01:40:13 -05:00
config: add alpha_mode option
This commit is contained in:
parent
9a6227acb3
commit
5f83278afd
5 changed files with 38 additions and 0 deletions
21
render.c
21
render.c
|
|
@ -788,6 +788,27 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
|||
alpha = term->colors.alpha;
|
||||
}
|
||||
}
|
||||
|
||||
if (!term->window->is_fullscreen) {
|
||||
switch (term->conf->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: {
|
||||
alpha = term->colors.alpha;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (unlikely(is_selected && _fg == _bg)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue