change the %Cl tag to be cleaner. it it now %Cl(x, y, width, height [, xalign][, yalign])
d,i,s modifiers are no longer supported (were there for origional compatability) and +,- modifiers are not supported anymore either. 
Legal values for xalign are: l,c,r (left, center, right)
Legal values for xalign are: t,c,b (top, center, bottom) 


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26475 a1c6a512-1295-4272-9138-f99709370657
diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c
index 537c53f..6577b77 100644
--- a/utils/skinupdater/skinupdater.c
+++ b/utils/skinupdater/skinupdater.c
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <stdbool.h>
 #include <string.h>
+#include <ctype.h>
 #include "tag_table.h"
 
 #define PUTCH(out, c) fprintf(out, "%c", c)
@@ -191,8 +192,78 @@
     }
     else if (MATCH("Cl"))
     {
+        int read;
+        char xalign = '\0', yalign = '\0';
         PUTCH(out, '(');
-        len += 1+dump_arg(out, start+1, 4, true);
+        read = 1+dump_arg(out, start+1, 2, false);
+        len += read;
+        start += read;
+        switch (tolower(*start))
+        {
+            case 'l':
+            case 'c':
+            case 'r':
+            case '+':
+            case '-':
+                xalign = *start;
+                len++;
+                start++;
+                break;
+            case 'd':
+            case 'D':
+            case 'i':
+            case 'I':
+            case 's':
+            case 'S':
+                len++;
+                start++;
+                break;
+        }
+        PUTCH(out,',');
+        read = dump_arg(out, start, 1, false);
+        len += read;
+        start += read;
+        switch (tolower(*start))
+        {
+            case 't':
+            case 'c':
+            case 'b':
+            case '+':
+            case '-':
+                yalign = *start;
+                len++;
+                start++;
+                break;
+            case 'd':
+            case 'D':
+            case 'i':
+            case 'I':
+            case 's':
+            case 'S':
+                len++;
+                start++;
+                break;
+        }
+        PUTCH(out,',');
+        read = dump_arg(out, start, 1, false);
+        if (xalign)
+        {
+            if (xalign == '-')
+                xalign = 'l';
+            if (xalign == '+')
+                xalign = 'r';
+            fprintf(out, ",%c", xalign); 
+        }
+        if (yalign)
+        {
+            if (yalign == '-')
+                yalign = 't';
+            if (yalign == '+')
+                yalign = 'b';
+            fprintf(out, ",%s%c", xalign?"":"-,", yalign); 
+        }
+        PUTCH(out, ')');
+        len += read;
     }
     else if (MATCH("Vd") || MATCH("VI"))
     {
diff --git a/utils/themeeditor/tag_table.c b/utils/themeeditor/tag_table.c
index 6ec3302..d128e5c 100644
--- a/utils/themeeditor/tag_table.c
+++ b/utils/themeeditor/tag_table.c
@@ -172,7 +172,7 @@
     { SKIN_TOKEN_IMAGE_PRELOAD,         "x", "SFII" },
     
     { SKIN_TOKEN_LOAD_FONT,             "Fl" , "IF"},
-    { SKIN_TOKEN_ALBUMART_LOAD,         "Cl" , "IISS"},
+    { SKIN_TOKEN_ALBUMART_LOAD,         "Cl" , "IIII|ss"},
     { SKIN_TOKEN_ALBUMART_DISPLAY,      "C" , ""},
     
     { SKIN_TOKEN_VIEWPORT_ENABLE,       "Vd" , "S"},