* Hide enable button in horizontal collapsed panels.
* Fix enable button not being in correct position when zooming.
* Fix n-key panels layout being messed up.
This commit is contained in:
Brecht Van Lommel
2009-05-20 17:18:48 +00:00
parent 3e49545891
commit 3cc2d61689
3 changed files with 4 additions and 6 deletions

View File

@@ -1346,7 +1346,7 @@ static void ui_litem_layout_free(uiLayout *litem)
scaley= (float)litem->h/(float)toth;
x= litem->x;
y= litem->y - scalex*toth;
y= litem->y - scaley*toth;
for(item=litem->items.first; item; item=item->next) {
ui_item_offset(item, &itemx, &itemy);

View File

@@ -451,10 +451,8 @@ static void ui_draw_aligned_panel_header(ARegion *ar, uiStyle *style, uiBlock *b
nr++;
/* + 0.001f to avoid flirting with float inaccuracy */
if(panel->control & UI_PNL_CLOSE) pnl_icons=(2*PNL_ICON+5)/block->aspect + 0.001f;
else pnl_icons= (PNL_ICON+5)/block->aspect + 0.001f;
pnl_icons += panel->labelofs;
if(panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f;
else pnl_icons= (panel->labelofs+PNL_ICON+5)/block->aspect + 0.001f;
if(nr==1) {

View File

@@ -1004,7 +1004,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
if(vertical)
y -= header;
if(pt->draw_header) {
if(pt->draw_header && (open || vertical)) {
/* for enabled buttons */
panel->layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
triangle, header+style->panelspace, header, 1, style);