Hello tasn,

I was still playing with the edje textblock, but couldn't make the
style tag "valign=top" work by any method. So I checked a bit the
code, and it seemed to me that it wasn't being used at all.

I could only make it work after some changes on the textblock code,
but I am not sure that's the right way to fix it. Anyway, could you
take a look at this patch? It should enable you to see the real
problem...

Regards,
-- 
Rafael Antognolli
ProFUSION embedded systems
http://profusion.mobi
diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c
index 320ef13..b76b36c 100644
--- a/src/lib/canvas/evas_object_textblock.c
+++ b/src/lib/canvas/evas_object_textblock.c
@@ -1887,6 +1887,7 @@ _layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt)
 {
    c->ln = calloc(1, sizeof(Evas_Object_Textblock_Line));
    c->align = fmt->halign;
+   c->valign = fmt->valign;
    c->align_auto = fmt->halign_auto;
    c->marginl = fmt->margin.l;
    c->marginr = fmt->margin.r;
@@ -2258,6 +2259,7 @@ _layout_format_value_handle(Ctxt *c, Evas_Object_Textblock_Format *fmt, const ch
    if (key) eina_stringshare_del(key);
    if (val) eina_stringshare_del(val);
    c->align = fmt->halign;
+   c->valign = fmt->valign;
    c->align_auto = fmt->halign_auto;
    c->marginl = fmt->margin.l;
    c->marginr = fmt->margin.r;
@@ -4303,9 +4305,9 @@ _layout(const Evas_Object *obj, int w, int h, int *w_ret, int *h_ret)
    if (h_ret) *h_ret = c->hmax;
 
    /* Vertically align the textblock */
-   if ((o->valign > 0.0) && (c->h > c->hmax))
+   if ((c->valign >= 0.0) && (c->h > c->hmax))
      {
-        Evas_Coord adjustment = (c->h - c->hmax) * o->valign;
+        Evas_Coord adjustment = (c->h - c->hmax) * c->valign;
         Evas_Object_Textblock_Paragraph *par;
         EINA_INLIST_FOREACH(c->paragraphs, par)
           {
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to