Revision: 18002
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18002
Author:   broken
Date:     2008-12-22 07:55:24 +0100 (Mon, 22 Dec 2008)

Log Message:
-----------
started some cleanups in button drawing code.

* Made normal 'rounded' theme use the same fake AA outline as round shaded
* Made rounded theme respect the 'button outline' theme colour - it never did 
before.

Modified Paths:
--------------
    
branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c

Modified: 
branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c   
    2008-12-22 05:51:34 UTC (rev 18001)
+++ 
branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c   
    2008-12-22 06:55:24 UTC (rev 18002)
@@ -922,51 +922,37 @@
                switch(align) {
                        case UI_BUT_ALIGN_TOP:
                                uiSetRoundBox(12);
-                               round_align_fix= 4;
                                break;
                        case UI_BUT_ALIGN_DOWN:
                                uiSetRoundBox(3);
-                               round_align_fix= 2;
                                break;
                        case UI_BUT_ALIGN_LEFT:
                                uiSetRoundBox(6);
-                               round_align_fix= 6;
                                break;
                        case UI_BUT_ALIGN_RIGHT:
                                uiSetRoundBox(9);
-                               round_align_fix= 9;
                                break;
                                
                        case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT:
                                uiSetRoundBox(1);
-                               round_align_fix= 0;
                                break;
                        case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT:
                                uiSetRoundBox(2);
-                               round_align_fix= 2;
                                break;
                        case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT:
                                uiSetRoundBox(8);
-                               round_align_fix= 0;
                                break;
                        case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT:
                                uiSetRoundBox(4);
-                               round_align_fix= 4;
                                break;
                                
                        default:
                                uiSetRoundBox(0);
-                               round_align_fix= 0;
                                break;
                }
        } 
        else {
                uiSetRoundBox(15);
-               if (x2 - x1 > 19) {
-                       round_align_fix= 6;
-               } else {
-                       round_align_fix= 15;
-               }
        }
        /* end alignment */
        
@@ -1694,24 +1680,12 @@
                gl_round_box(GL_POLYGON, x2-menudeco, y1, x2, y2, rad);
        }
        
-       /* fake AA */
+       /* outline */
+       UI_ThemeColorBlendShade(TH_BUT_OUTLINE, TH_BACK, 0.1, -30);
+       
        uiSetRoundBox(round);
-       glEnable( GL_BLEND );
-
-       UI_GetThemeColor3ubv(colorid, col);
-               
-       if(col[0]<100) col[0]= 0; else col[0]-= 100;
-       if(col[1]<100) col[1]= 0; else col[1]-= 100;
-       if(col[2]<100) col[2]= 0; else col[2]-= 100;
-       col[3]= 80;
-       glColor4ubv((GLubyte *)col);
-       gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad - asp);
-       gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad + asp);
-       col[3]= 180;
-       glColor4ubv((GLubyte *)col);
-       gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad);
-
-       glDisable( GL_BLEND );
+       uiRoundRectFakeAA(x1, y1, x2, y2, rad, asp);
+       /* end outline */
 }
 
 /* button in midst of alignment row */
@@ -3093,7 +3067,7 @@
                case TH_ROUNDSHADED:
                default:
                        but->embossfunc= ui_draw_roundshaded;
-                       but->sliderfunc= ui_default_slider;
+                       // but->sliderfunc= ui_default_slider;
                        break;
                }
        }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to