UI: tweak to panel header padding, made region expander a bit smaller and
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 27 Nov 2011 14:06:47 +0000 (14:06 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 27 Nov 2011 14:06:47 +0000 (14:06 +0000)
fix bug #29422, left expander drawing over adjacent editor.

source/blender/editors/interface/interface_panel.c
source/blender/editors/screen/area.c

index d66e6852f1d16d4eec6c61886a87558be845c180..38b0c2f6d382e6a269b0348884ba7c38558eb8d8 100644 (file)
@@ -494,7 +494,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
        /* calculate header rect */
        /* + 0.001f to prevent flicker due to float inaccuracy */
        headrect= *rect;
-       headrect.ymin= headrect.ymax - 2.0f/block->aspect;
+       headrect.ymin= headrect.ymax;
        headrect.ymax= headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
        
        {
@@ -508,7 +508,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
                        /* draw with background color */
                        glEnable(GL_BLEND);
                        glColor4ubv((unsigned char*)btheme->tui.panel.header);
-                       glRectf(minx, headrect.ymin, maxx, y);
+                       glRectf(minx, headrect.ymin+1, maxx, y);
 
                        fdrawline(minx, y, maxx, y);
                        fdrawline(minx, y, maxx, y);
index f3d087d6986e5250286099dba716786a7a3232c4..24c261095026e8c8edf73831c09badc46115088e 100644 (file)
@@ -262,12 +262,12 @@ static void region_draw_azone_tab_plus(AZone *az)
                        break;
        }
 
-       glColor4f(0.05f, 0.05f, 0.05f, 0.5f);
+       glColor4f(0.05f, 0.05f, 0.05f, 0.4f);
        uiRoundBox((float)az->x1, (float)az->y1, (float)az->x2, (float)az->y2, 4.0f);
 
        glEnable(GL_BLEND);
 
-       glColor4f(0.8f, 0.8f, 0.8f, 0.5f);
+       glColor4f(0.8f, 0.8f, 0.8f, 0.4f);
        draw_azone_plus((float)az->x1, (float)az->y1, (float)az->x2, (float)az->y2);
 
        glDisable(GL_BLEND);
@@ -711,8 +711,8 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
        }
 }
 
-#define AZONEPAD_TAB_PLUSW     16
-#define AZONEPAD_TAB_PLUSH     16
+#define AZONEPAD_TAB_PLUSW     14
+#define AZONEPAD_TAB_PLUSH     14
 
 /* region already made zero sized, in shape of edge */
 static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar)
@@ -739,9 +739,9 @@ static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar)
                        az->y2= ar->winrct.ymin;
                        break;
                case AE_LEFT_TO_TOPRIGHT:
-                       az->x1= ar->winrct.xmin + 1 - AZONEPAD_TAB_PLUSH;
+                       az->x1= ar->winrct.xmin - AZONEPAD_TAB_PLUSH;
                        az->y1= ar->winrct.ymax - 2.5*AZONEPAD_TAB_PLUSW;
-                       az->x2= ar->winrct.xmin + 1;
+                       az->x2= ar->winrct.xmin;
                        az->y2= ar->winrct.ymax - 1.5*AZONEPAD_TAB_PLUSW;
                        break;
                case AE_RIGHT_TO_TOPLEFT: