Draw underlines under the text instead of over it

This commit is contained in:
Kovid Goyal 2018-09-03 09:48:53 +05:30
parent 6ec58f58ce
commit f8395e36a1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,8 @@ Changelog
- Fix legacy invocation of icat as `kitty icat` not working (:iss:`850`)
- Draw underlines under the text instead of over it
0.12.0 [2018-09-01]
------------------------------

View File

@ -64,7 +64,7 @@ vec4 calculate_foreground() {
// Since strike and text are the same color, we simply add the alpha values
float combined_alpha = min(text_alpha + strike_alpha, 1.0f);
// Underline color might be different, so alpha blend
vec4 ans = alpha_blend(decoration_fg, underline_alpha * effective_text_alpha, fg, combined_alpha * effective_text_alpha);
vec4 ans = alpha_blend(fg, combined_alpha * effective_text_alpha, decoration_fg, underline_alpha * effective_text_alpha);
return mix(ans, cursor_color_vec, cursor_alpha);
}
#endif