UI: another tweak to panel header drawing, to get the checkboxes positioned right.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 29 Nov 2011 23:00:10 +0000 (23:00 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 29 Nov 2011 23:00:10 +0000 (23:00 +0000)
source/blender/editors/interface/interface_panel.c
source/blender/editors/screen/area.c

index 38b0c2f6d382e6a269b0348884ba7c38558eb8d8..1edfa2f4ea69d4426de30ebe0474ac9254cba92a 100644 (file)
@@ -455,6 +455,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
        hrect= *rect;
        if(dir == 'h') {
                hrect.xmin= rect->xmin+pnl_icons;
+               hrect.ymin += 2.0f/block->aspect;
                uiStyleFontDraw(&style->paneltitle, &hrect, activename);
        }
        else {
@@ -519,9 +520,9 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
                        maxx -= 5.0f/block->aspect;
                        
                        glColor4f(0.0f, 0.0f, 0.0f, 0.5f);
-                       fdrawline(minx, y+1, maxx, y+1);
-                       glColor4f(1.0f, 1.0f, 1.0f, 0.25f);
                        fdrawline(minx, y, maxx, y);
+                       glColor4f(1.0f, 1.0f, 1.0f, 0.25f);
+                       fdrawline(minx, y-1, maxx, y-1);
                        glDisable(GL_BLEND);
                }
 
index 24c261095026e8c8edf73831c09badc46115088e..f7fe98edf0203c3aaeeabb2f2fc4926c48db801a 100644 (file)
@@ -1596,7 +1596,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
                        if(pt->draw_header && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) {
                                /* for enabled buttons */
                                panel->layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
-                                       triangle, UI_UNIT_Y+style->panelspace, UI_UNIT_Y, 1, style);
+                                       triangle, UI_UNIT_Y+style->panelspace+2, UI_UNIT_Y, 1, style);
 
                                pt->draw_header(C, panel);