This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/149/head
in repository efl.

View the commit online.

commit a4e070e3c6c7ca6f4d5d988361a293e6408d2a74
Author: Boris Faure <[email protected]>
AuthorDate: Thu Sep 17 12:00:00 2026 +0200

    evas/textgrid: render the overline cell attribute
    
    do just like underline
---
 src/lib/evas/Evas_Common.h                 |  1 +
 src/lib/evas/canvas/evas_object_textgrid.c | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 35b18f59d1..e1bd7825c3 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -1872,6 +1872,7 @@ struct _Evas_Textgrid_Cell
    unsigned short fg_extended   : 1; /**< whether the extended palette is used for the foreground color */
    unsigned short bg_extended   : 1; /**< whether the extended palette is used for the background color */
    unsigned short double_width  : 1; /**< if the codepoint is merged with the following cell to the right visually (cells must be in pairs with 2nd cell being a duplicate in all ways except codepoint is 0) */
+   unsigned short overline      : 1; /**< whether the character is overlined @since 1.29 */
 };
 
 /**
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index 297f8cb24f..4d1f560e12 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -75,7 +75,7 @@ struct _Evas_Object_Textgrid_Row
    int rects_alloc, texts_alloc, lines_alloc;
    Evas_Object_Textgrid_Rect *rects; // rects + colors
    Evas_Object_Textgrid_Text *texts; // text
-   Evas_Object_Textgrid_Line *lines; // underlines, strikethroughs
+   Evas_Object_Textgrid_Line *lines; // underlines, strikethroughs, overlines
 };
 
 struct _Evas_Object_Textgrid_Rect
@@ -640,7 +640,7 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED,
                                                        rr, rg, rb, ra);
                }
              if ((cells->codepoint > 0) || (cells->underline) ||
-                 (cells->strikethrough))
+                 (cells->strikethrough) || (cells->overline))
                {
                   if (cells->fg_extended) palette = &(o->cur.palette_extended);
                   else palette = &(o->cur.palette_standard);
@@ -655,8 +655,8 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED,
                                                               c->r, c->g, c->b, c->a,
                                                               cells->bold,
                                                               cells->italic);
-                       // XXX: underlines and strikethroughs don't get
-                       // merged into horizontal runs like bg rects above
+                       // XXX: underlines, strikethroughs and overlines don't
+                       // get merged into horizontal runs like bg rects above
                        if (cells->underline)
                          evas_object_textgrid_row_line_append(row, xp, w,
                                                               o->ascent + 1,
@@ -665,6 +665,9 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED,
                          evas_object_textgrid_row_line_append(row, xp, w,
                                                               ((3 * o->ascent) / 4),
                                                               c->r, c->g, c->b, c->a);
+                       if (cells->overline)
+                         evas_object_textgrid_row_line_append(row, xp, w, 0,
+                                                              c->r, c->g, c->b, c->a);
                     }
                }
              xp += w;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to