Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        iclass.c tclass.h text.c 


Log Message:
Fix drawing of vertical border text in certain themes.

===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -3 -r1.104 -r1.105
--- iclass.c    14 May 2006 16:01:17 -0000      1.104
+++ iclass.c    25 May 2006 00:18:09 -0000      1.105
@@ -1193,13 +1193,9 @@
                       EXCopyArea(pmm.pmap, pmap, 0, 0, w, h, 0, 0);
                    }
 
-                 TextstateDrawText(ts, win, pmap, text, ic->padding.left,
-                                   ic->padding.top,
-                                   w - (ic->padding.left +
-                                        ic->padding.right),
-                                   h - (ic->padding.top +
-                                        ic->padding.bottom),
-                                   0, TextclassGetJustification(tc));
+                 TextstateDrawText(ts, win, pmap, text, 0, 0, w, h,
+                                   &(ic->padding), 0,
+                                   TextclassGetJustification(tc));
               }
 
             /* Set window pixmap */
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- tclass.h    14 May 2006 19:38:51 -0000      1.11
+++ tclass.h    25 May 2006 00:18:10 -0000      1.12
@@ -84,7 +84,8 @@
                                          int active, int sticky);
 void                TextstateDrawText(TextState * ts, Win win, Drawable draw,
                                      const char *text, int x, int y, int w,
-                                     int h, int fsize, int justification);
+                                     int h, const EImageBorder * pad,
+                                     int fsize, int justification);
 void                TextSize(TextClass * tclass, int active, int sticky,
                             int state, const char *text, int *width,
                             int *height, int fsize);
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- text.c      14 May 2006 19:38:51 -0000      1.72
+++ text.c      25 May 2006 00:18:10 -0000      1.73
@@ -420,8 +420,8 @@
 
 void
 TextstateDrawText(TextState * ts, Win win, Drawable draw, const char *text,
-                 int x, int y, int w, int h, int fsize __UNUSED__,
-                 int justification)
+                 int x, int y, int w, int h, const EImageBorder * pad,
+                 int fsize __UNUSED__, int justification)
 {
    const char         *str;
    char              **lines;
@@ -448,9 +448,27 @@
 
    if (ts->style.orientation == FONT_TO_RIGHT ||
        ts->style.orientation == FONT_TO_LEFT)
-      textwidth_limit = w;
+     {
+       if (pad)
+         {
+            x += pad->left;
+            w -= pad->left + pad->right;
+            y += pad->top;
+            h -= pad->top + pad->bottom;
+         }
+       textwidth_limit = w;
+     }
    else
-      textwidth_limit = h;
+     {
+       if (pad)
+         {
+            x += pad->left;
+            h -= pad->left + pad->right;
+            y += pad->top;
+            w -= pad->top + pad->bottom;
+         }
+       textwidth_limit = h;
+     }
 
    xx = x;
    yy = y;
@@ -886,5 +904,6 @@
    if (!ts)
       return;
 
-   TextstateDrawText(ts, win, draw, text, x, y, w, h, fsize, justification);
+   TextstateDrawText(ts, win, draw, text, x, y, w, h, NULL, fsize,
+                    justification);
 }




-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to