mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-27 06:46:44 -04:00
Improve render refresh and undef macro
This commit is contained in:
parent
fd28668a1c
commit
1b8cb9ef91
1 changed files with 7 additions and 3 deletions
10
terminal.c
10
terminal.c
|
|
@ -2010,7 +2010,8 @@ bool
|
||||||
term_alpha_increase(struct terminal *term)
|
term_alpha_increase(struct terminal *term)
|
||||||
{
|
{
|
||||||
term->colors.alpha = clamp(term->colors.alpha + ALPHA_STEP, 0, UINT16_MAX);
|
term->colors.alpha = clamp(term->colors.alpha + ALPHA_STEP, 0, UINT16_MAX);
|
||||||
term->render.last_buf = NULL;
|
term_damage_view(term);
|
||||||
|
term_damage_margins(term);
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -2019,7 +2020,8 @@ bool
|
||||||
term_alpha_decrease(struct terminal *term)
|
term_alpha_decrease(struct terminal *term)
|
||||||
{
|
{
|
||||||
term->colors.alpha = clamp(term->colors.alpha - ALPHA_STEP, 0, UINT16_MAX);
|
term->colors.alpha = clamp(term->colors.alpha - ALPHA_STEP, 0, UINT16_MAX);
|
||||||
term->render.last_buf = NULL;
|
term_damage_view(term);
|
||||||
|
term_damage_margins(term);
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -2028,10 +2030,12 @@ bool
|
||||||
term_alpha_reset(struct terminal *term)
|
term_alpha_reset(struct terminal *term)
|
||||||
{
|
{
|
||||||
term->colors.alpha = term->conf->colors.alpha;
|
term->colors.alpha = term->conf->colors.alpha;
|
||||||
term->render.last_buf = NULL;
|
term_damage_view(term);
|
||||||
|
term_damage_margins(term);
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#undef ALPHA_STEP
|
||||||
|
|
||||||
bool
|
bool
|
||||||
term_font_dpi_changed(struct terminal *term, int old_scale)
|
term_font_dpi_changed(struct terminal *term, int old_scale)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue