svn merge -r 15392:15551 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / src / interface_draw.c
index fdb5fea658ce32bc66d6f5b60b5bdaf0bd98e5b3..e7041e6000373b2433e278780822dc7eb9d01aba 100644 (file)
@@ -180,8 +180,12 @@ static void ui_draw_icon(uiBut *but, BIFIconID icon, int blend)
                height= ICON_HEIGHT;
        
        if(but->flag & UI_ICON_LEFT) {
-               if (but->type==BUT_TOGDUAL && but->drawstr[0]) {
-                       xs= but->x1-1.0;
+               if (but->type==BUT_TOGDUAL) {
+                       if (but->drawstr[0]) {
+                               xs= but->x1-1.0;
+                       } else {
+                               xs= (but->x1+but->x2- height)/2.0;
+                       }
                }
                else if (but->type==BUTM ) {
                        xs= but->x1+1.0;
@@ -846,6 +850,7 @@ static void ui_default_flat(int type, int colorid, float asp, float x1, float y1
        /* *** EXTRA DRAWING FOR SPECIFIC CONTROL TYPES *** */
        switch(type) {
        case NUM:
+       case NUMABS:
                /* SIDE ARROWS */
                /* left */
                if(flag & UI_SELECT) {
@@ -872,11 +877,12 @@ static void ui_default_slider(int colorid, float fac, float aspect, float x1, fl
        
        if(flag & UI_SELECT) 
                        BIF_ThemeColorShade(TH_BUT_NUM, -5);
-       else
+       else {
                if(flag & UI_ACTIVE) 
                        BIF_ThemeColorShade(TH_BUT_NUM, +35); 
                else
                        BIF_ThemeColorShade(TH_BUT_NUM, +25); 
+       }
 
        glRectf(x1, ymid-yc, x2, ymid+yc);
        
@@ -943,6 +949,7 @@ static void ui_draw_default(int type, int colorid, float aspect, float x1, float
        case TEX:
        case IDPOIN:
        case NUM:
+       case NUMABS:
                ui_default_flat(type, colorid, aspect, x1, y1, x2, y2, flag);
                break;
        case ICONROW: 
@@ -1026,6 +1033,7 @@ static void ui_draw_oldskool(int type, int colorid, float asp, float x1, float y
        /* special type decorations */
        switch(type) {
        case NUM:
+       case NUMABS:
                if(flag & UI_SELECT) BIF_ThemeColorShade(colorid, -60);
                else BIF_ThemeColorShade(colorid, -30);
                ui_default_num_arrows(x1, y1, x2, y2);
@@ -1176,6 +1184,7 @@ static void ui_draw_round(int type, int colorid, float asp, float x1, float y1,
        /* special type decorations */
        switch(type) {
        case NUM:
+       case NUMABS:
                BIF_ThemeColorShade(colorid, curshade-60);
                ui_default_num_arrows(x1, y1, x2, y2);
                break;
@@ -1285,6 +1294,7 @@ static void ui_draw_minimal(int type, int colorid, float asp, float x1, float y1
        /* special type decorations */
        switch(type) {
        case NUM:
+       case NUMABS:
                if(flag & UI_SELECT) BIF_ThemeColorShade(colorid, -60);
                else BIF_ThemeColorShade(colorid, -30);
                ui_default_num_arrows(x1, y1, x2, y2);
@@ -1839,7 +1849,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
                        int err;
 
                        strcpy(tmpStr, G.selfont->name);
-                       BLI_convertstringcode(tmpStr, G.sce, 0);
+                       BLI_convertstringcode(tmpStr, G.sce);
                        err = FTF_SetFont((unsigned char *)tmpStr, 0, 14.0);
                }
        }