diff options
| author | Eli Zaretskii | 2024-04-27 12:07:53 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-04-27 12:07:53 +0300 |
| commit | 4e17e0b84ae1a52a6032c83592bf958a1e26dea5 (patch) | |
| tree | 37e907871379edca5419d974f69d7200af422b5b /src | |
| parent | 9f589eb924085a4612f46728e8850073128a2e43 (diff) | |
| download | emacs-4e17e0b84ae1a52a6032c83592bf958a1e26dea5.tar.gz emacs-4e17e0b84ae1a52a6032c83592bf958a1e26dea5.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/androidterm.c | 6 | ||||
| -rw-r--r-- | src/haikuterm.c | 6 | ||||
| -rw-r--r-- | src/nsterm.m | 6 | ||||
| -rw-r--r-- | src/pgtkterm.c | 6 | ||||
| -rw-r--r-- | src/w32term.c | 6 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/androidterm.c b/src/androidterm.c index 5de7b6f4e14..f5173168785 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -4158,7 +4158,7 @@ android_draw_glyph_string (struct glyph_string *s) | |||
| 4158 | /* Draw underline. */ | 4158 | /* Draw underline. */ |
| 4159 | if (s->face->underline) | 4159 | if (s->face->underline) |
| 4160 | { | 4160 | { |
| 4161 | if (s->face->underline == FACE_UNDER_WAVE) | 4161 | if (s->face->underline == FACE_UNDERLINE_WAVE) |
| 4162 | { | 4162 | { |
| 4163 | if (s->face->underline_defaulted_p) | 4163 | if (s->face->underline_defaulted_p) |
| 4164 | android_draw_underwave (s, decoration_width); | 4164 | android_draw_underwave (s, decoration_width); |
| @@ -4171,13 +4171,13 @@ android_draw_glyph_string (struct glyph_string *s) | |||
| 4171 | android_set_foreground (s->gc, xgcv.foreground); | 4171 | android_set_foreground (s->gc, xgcv.foreground); |
| 4172 | } | 4172 | } |
| 4173 | } | 4173 | } |
| 4174 | else if (s->face->underline == FACE_UNDER_LINE) | 4174 | else if (s->face->underline == FACE_UNDERLINE_SINGLE) |
| 4175 | { | 4175 | { |
| 4176 | unsigned long thickness, position; | 4176 | unsigned long thickness, position; |
| 4177 | int y; | 4177 | int y; |
| 4178 | 4178 | ||
| 4179 | if (s->prev | 4179 | if (s->prev |
| 4180 | && s->prev->face->underline == FACE_UNDER_LINE | 4180 | && s->prev->face->underline == FACE_UNDERLINE_SINGLE |
| 4181 | && (s->prev->face->underline_at_descent_line_p | 4181 | && (s->prev->face->underline_at_descent_line_p |
| 4182 | == s->face->underline_at_descent_line_p) | 4182 | == s->face->underline_at_descent_line_p) |
| 4183 | && (s->prev->face->underline_pixels_above_descent_line | 4183 | && (s->prev->face->underline_pixels_above_descent_line |
diff --git a/src/haikuterm.c b/src/haikuterm.c index 135f99dbdcb..c3971bf6fe4 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c | |||
| @@ -827,15 +827,15 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, | |||
| 827 | else | 827 | else |
| 828 | BView_SetHighColor (view, face->foreground); | 828 | BView_SetHighColor (view, face->foreground); |
| 829 | 829 | ||
| 830 | if (face->underline == FACE_UNDER_WAVE) | 830 | if (face->underline == FACE_UNDERLINE_WAVE) |
| 831 | haiku_draw_underwave (s, width, x); | 831 | haiku_draw_underwave (s, width, x); |
| 832 | else if (face->underline == FACE_UNDER_LINE) | 832 | else if (face->underline == FACE_UNDERLINE_SINGLE) |
| 833 | { | 833 | { |
| 834 | unsigned long thickness, position; | 834 | unsigned long thickness, position; |
| 835 | int y; | 835 | int y; |
| 836 | 836 | ||
| 837 | if (s->prev | 837 | if (s->prev |
| 838 | && s->prev->face->underline == FACE_UNDER_LINE | 838 | && s->prev->face->underline == FACE_UNDERLINE_SINGLE |
| 839 | && (s->prev->face->underline_at_descent_line_p | 839 | && (s->prev->face->underline_at_descent_line_p |
| 840 | == s->face->underline_at_descent_line_p) | 840 | == s->face->underline_at_descent_line_p) |
| 841 | && (s->prev->face->underline_pixels_above_descent_line | 841 | && (s->prev->face->underline_pixels_above_descent_line |
diff --git a/src/nsterm.m b/src/nsterm.m index faf9324402b..84d94b5be74 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3330,14 +3330,14 @@ ns_draw_text_decoration (struct glyph_string *s, struct face *face, | |||
| 3330 | /* Do underline. */ | 3330 | /* Do underline. */ |
| 3331 | if (face->underline) | 3331 | if (face->underline) |
| 3332 | { | 3332 | { |
| 3333 | if (s->face->underline == FACE_UNDER_WAVE) | 3333 | if (s->face->underline == FACE_UNDERLINE_WAVE) |
| 3334 | { | 3334 | { |
| 3335 | if (!face->underline_defaulted_p) | 3335 | if (!face->underline_defaulted_p) |
| 3336 | [[NSColor colorWithUnsignedLong:face->underline_color] set]; | 3336 | [[NSColor colorWithUnsignedLong:face->underline_color] set]; |
| 3337 | 3337 | ||
| 3338 | ns_draw_underwave (s, width, x); | 3338 | ns_draw_underwave (s, width, x); |
| 3339 | } | 3339 | } |
| 3340 | else if (s->face->underline == FACE_UNDER_LINE) | 3340 | else if (s->face->underline == FACE_UNDERLINE_SINGLE) |
| 3341 | { | 3341 | { |
| 3342 | 3342 | ||
| 3343 | NSRect r; | 3343 | NSRect r; |
| @@ -3345,7 +3345,7 @@ ns_draw_text_decoration (struct glyph_string *s, struct face *face, | |||
| 3345 | 3345 | ||
| 3346 | /* If the prev was underlined, match its appearance. */ | 3346 | /* If the prev was underlined, match its appearance. */ |
| 3347 | if (s->prev | 3347 | if (s->prev |
| 3348 | && s->prev->face->underline == FACE_UNDER_LINE | 3348 | && s->prev->face->underline == FACE_UNDERLINE_SINGLE |
| 3349 | && s->prev->underline_thickness > 0 | 3349 | && s->prev->underline_thickness > 0 |
| 3350 | && (s->prev->face->underline_at_descent_line_p | 3350 | && (s->prev->face->underline_at_descent_line_p |
| 3351 | == s->face->underline_at_descent_line_p) | 3351 | == s->face->underline_at_descent_line_p) |
diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 1ec6bfcda4e..e08e4b2b230 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c | |||
| @@ -2546,20 +2546,20 @@ pgtk_draw_glyph_string (struct glyph_string *s) | |||
| 2546 | /* Draw underline. */ | 2546 | /* Draw underline. */ |
| 2547 | if (s->face->underline) | 2547 | if (s->face->underline) |
| 2548 | { | 2548 | { |
| 2549 | if (s->face->underline == FACE_UNDER_WAVE) | 2549 | if (s->face->underline == FACE_UNDERLINE_WAVE) |
| 2550 | { | 2550 | { |
| 2551 | if (s->face->underline_defaulted_p) | 2551 | if (s->face->underline_defaulted_p) |
| 2552 | pgtk_draw_underwave (s, s->xgcv.foreground); | 2552 | pgtk_draw_underwave (s, s->xgcv.foreground); |
| 2553 | else | 2553 | else |
| 2554 | pgtk_draw_underwave (s, s->face->underline_color); | 2554 | pgtk_draw_underwave (s, s->face->underline_color); |
| 2555 | } | 2555 | } |
| 2556 | else if (s->face->underline == FACE_UNDER_LINE) | 2556 | else if (s->face->underline == FACE_UNDERLINE_SINGLE) |
| 2557 | { | 2557 | { |
| 2558 | unsigned long thickness, position; | 2558 | unsigned long thickness, position; |
| 2559 | int y; | 2559 | int y; |
| 2560 | 2560 | ||
| 2561 | if (s->prev | 2561 | if (s->prev |
| 2562 | && s->prev->face->underline == FACE_UNDER_LINE | 2562 | && s->prev->face->underline == FACE_UNDERLINE_SINGLE |
| 2563 | && (s->prev->face->underline_at_descent_line_p | 2563 | && (s->prev->face->underline_at_descent_line_p |
| 2564 | == s->face->underline_at_descent_line_p) | 2564 | == s->face->underline_at_descent_line_p) |
| 2565 | && (s->prev->face->underline_pixels_above_descent_line | 2565 | && (s->prev->face->underline_pixels_above_descent_line |
diff --git a/src/w32term.c b/src/w32term.c index 7afd1303b4d..20ea346c8aa 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2641,7 +2641,7 @@ w32_draw_glyph_string (struct glyph_string *s) | |||
| 2641 | /* Draw underline. */ | 2641 | /* Draw underline. */ |
| 2642 | if (s->face->underline) | 2642 | if (s->face->underline) |
| 2643 | { | 2643 | { |
| 2644 | if (s->face->underline == FACE_UNDER_WAVE) | 2644 | if (s->face->underline == FACE_UNDERLINE_WAVE) |
| 2645 | { | 2645 | { |
| 2646 | COLORREF color; | 2646 | COLORREF color; |
| 2647 | 2647 | ||
| @@ -2652,13 +2652,13 @@ w32_draw_glyph_string (struct glyph_string *s) | |||
| 2652 | 2652 | ||
| 2653 | w32_draw_underwave (s, color); | 2653 | w32_draw_underwave (s, color); |
| 2654 | } | 2654 | } |
| 2655 | else if (s->face->underline == FACE_UNDER_LINE) | 2655 | else if (s->face->underline == FACE_UNDERLINE_SINGLE) |
| 2656 | { | 2656 | { |
| 2657 | unsigned long thickness, position; | 2657 | unsigned long thickness, position; |
| 2658 | int y; | 2658 | int y; |
| 2659 | 2659 | ||
| 2660 | if (s->prev | 2660 | if (s->prev |
| 2661 | && s->prev->face->underline == FACE_UNDER_LINE | 2661 | && s->prev->face->underline == FACE_UNDERLINE_SINGLE |
| 2662 | && (s->prev->face->underline_at_descent_line_p | 2662 | && (s->prev->face->underline_at_descent_line_p |
| 2663 | == s->face->underline_at_descent_line_p) | 2663 | == s->face->underline_at_descent_line_p) |
| 2664 | && (s->prev->face->underline_pixels_above_descent_line | 2664 | && (s->prev->face->underline_pixels_above_descent_line |