Followup changes for styled underline support

* src/nsterm.m (ns_draw_text_decoration):
* src/pgtkterm.c (pgtk_draw_glyph_string):
* src/haikuterm.c (haiku_draw_text_decoration):
* src/androidterm.c (android_draw_glyph_string):
* src/w32term.c (w32_draw_glyph_string): Use new FACE_UNDER*
constants.  (Bug#62994)
This commit is contained in:
Eli Zaretskii 2024-04-27 12:07:53 +03:00
parent 9f589eb924
commit 4e17e0b84a
5 changed files with 15 additions and 15 deletions

View file

@ -4158,7 +4158,7 @@ android_draw_glyph_string (struct glyph_string *s)
/* Draw underline. */
if (s->face->underline)
{
if (s->face->underline == FACE_UNDER_WAVE)
if (s->face->underline == FACE_UNDERLINE_WAVE)
{
if (s->face->underline_defaulted_p)
android_draw_underwave (s, decoration_width);
@ -4171,13 +4171,13 @@ android_draw_glyph_string (struct glyph_string *s)
android_set_foreground (s->gc, xgcv.foreground);
}
}
else if (s->face->underline == FACE_UNDER_LINE)
else if (s->face->underline == FACE_UNDERLINE_SINGLE)
{
unsigned long thickness, position;
int y;
if (s->prev
&& s->prev->face->underline == FACE_UNDER_LINE
&& s->prev->face->underline == FACE_UNDERLINE_SINGLE
&& (s->prev->face->underline_at_descent_line_p
== s->face->underline_at_descent_line_p)
&& (s->prev->face->underline_pixels_above_descent_line

View file

@ -827,15 +827,15 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face,
else
BView_SetHighColor (view, face->foreground);
if (face->underline == FACE_UNDER_WAVE)
if (face->underline == FACE_UNDERLINE_WAVE)
haiku_draw_underwave (s, width, x);
else if (face->underline == FACE_UNDER_LINE)
else if (face->underline == FACE_UNDERLINE_SINGLE)
{
unsigned long thickness, position;
int y;
if (s->prev
&& s->prev->face->underline == FACE_UNDER_LINE
&& s->prev->face->underline == FACE_UNDERLINE_SINGLE
&& (s->prev->face->underline_at_descent_line_p
== s->face->underline_at_descent_line_p)
&& (s->prev->face->underline_pixels_above_descent_line

View file

@ -3330,14 +3330,14 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
/* Do underline. */
if (face->underline)
{
if (s->face->underline == FACE_UNDER_WAVE)
if (s->face->underline == FACE_UNDERLINE_WAVE)
{
if (!face->underline_defaulted_p)
[[NSColor colorWithUnsignedLong:face->underline_color] set];
ns_draw_underwave (s, width, x);
}
else if (s->face->underline == FACE_UNDER_LINE)
else if (s->face->underline == FACE_UNDERLINE_SINGLE)
{
NSRect r;
@ -3345,7 +3345,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
/* If the prev was underlined, match its appearance. */
if (s->prev
&& s->prev->face->underline == FACE_UNDER_LINE
&& s->prev->face->underline == FACE_UNDERLINE_SINGLE
&& s->prev->underline_thickness > 0
&& (s->prev->face->underline_at_descent_line_p
== s->face->underline_at_descent_line_p)

View file

@ -2546,20 +2546,20 @@ pgtk_draw_glyph_string (struct glyph_string *s)
/* Draw underline. */
if (s->face->underline)
{
if (s->face->underline == FACE_UNDER_WAVE)
if (s->face->underline == FACE_UNDERLINE_WAVE)
{
if (s->face->underline_defaulted_p)
pgtk_draw_underwave (s, s->xgcv.foreground);
else
pgtk_draw_underwave (s, s->face->underline_color);
}
else if (s->face->underline == FACE_UNDER_LINE)
else if (s->face->underline == FACE_UNDERLINE_SINGLE)
{
unsigned long thickness, position;
int y;
if (s->prev
&& s->prev->face->underline == FACE_UNDER_LINE
&& s->prev->face->underline == FACE_UNDERLINE_SINGLE
&& (s->prev->face->underline_at_descent_line_p
== s->face->underline_at_descent_line_p)
&& (s->prev->face->underline_pixels_above_descent_line

View file

@ -2641,7 +2641,7 @@ w32_draw_glyph_string (struct glyph_string *s)
/* Draw underline. */
if (s->face->underline)
{
if (s->face->underline == FACE_UNDER_WAVE)
if (s->face->underline == FACE_UNDERLINE_WAVE)
{
COLORREF color;
@ -2652,13 +2652,13 @@ w32_draw_glyph_string (struct glyph_string *s)
w32_draw_underwave (s, color);
}
else if (s->face->underline == FACE_UNDER_LINE)
else if (s->face->underline == FACE_UNDERLINE_SINGLE)
{
unsigned long thickness, position;
int y;
if (s->prev
&& s->prev->face->underline == FACE_UNDER_LINE
&& s->prev->face->underline == FACE_UNDERLINE_SINGLE
&& (s->prev->face->underline_at_descent_line_p
== s->face->underline_at_descent_line_p)
&& (s->prev->face->underline_pixels_above_descent_line