mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-12 05:34:01 -04:00
render: reduce amount of dim while searching scrollback history
This commit is contained in:
parent
94b4c916ee
commit
2a31c2fbbc
1 changed files with 10 additions and 4 deletions
14
render.c
14
render.c
|
|
@ -72,6 +72,14 @@ pixman_color_dim(pixman_color_t *color)
|
||||||
color->blue /= 2;
|
color->blue /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
pixman_color_dim_for_search(pixman_color_t *color)
|
||||||
|
{
|
||||||
|
color->red /= 3;
|
||||||
|
color->green /= 3;
|
||||||
|
color->blue /= 3;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw_bar(const struct terminal *term, pixman_image_t *pix,
|
draw_bar(const struct terminal *term, pixman_image_t *pix,
|
||||||
const pixman_color_t *color, int x, int y)
|
const pixman_color_t *color, int x, int y)
|
||||||
|
|
@ -205,10 +213,8 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (term->is_searching && !is_selected) {
|
if (term->is_searching && !is_selected) {
|
||||||
pixman_color_dim(&fg);
|
pixman_color_dim_for_search(&fg);
|
||||||
pixman_color_dim(&bg);
|
pixman_color_dim_for_search(&bg);
|
||||||
pixman_color_dim(&fg);
|
|
||||||
pixman_color_dim(&bg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct font *font = attrs_to_font(term, &cell->attrs);
|
struct font *font = attrs_to_font(term, &cell->attrs);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue