forked from bartvdbraak/blender
UI: another tweak to panel header drawing, to get the checkboxes positioned right.
This commit is contained in:
parent
6ec3313e2d
commit
aff705c430
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user