Commit: 5ce120b865edf3ac83f73e96e0090b90d5e5c205 Author: raa Date: Tue Mar 28 00:07:31 2017 +0300 Branches: master https://developer.blender.org/rB5ce120b865edf3ac83f73e96e0090b90d5e5c205
Fix columns with fixed width =================================================================== M source/blender/editors/interface/interface_layout.c =================================================================== diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index bb789f91e76..7b0921941e7 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2266,6 +2266,7 @@ static void ui_litem_estimate_column(uiLayout *litem, bool is_box) { uiItem *item; int itemw, itemh; + bool min_size_flag = true; litem->w = 0; litem->h = 0; @@ -2273,12 +2274,18 @@ static void ui_litem_estimate_column(uiLayout *litem, bool is_box) for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); + min_size_flag = min_size_flag && (item->flag & UI_ITEM_MIN); + litem->w = MAX2(litem->w, itemw); litem->h += itemh; if (item->next && (!is_box || item != litem->items.first)) litem->h += litem->space; } + + if (min_size_flag) { + litem->item.flag |= UI_ITEM_MIN; + } } static void ui_litem_layout_column(uiLayout *litem, bool is_box) @@ -2446,6 +2453,7 @@ static void ui_litem_estimate_box(uiLayout *litem) uiStyle *style = litem->root->style; ui_litem_estimate_column(litem, true); + litem->item.flag &= ~UI_ITEM_MIN; litem->w += 2 * style->boxspace; litem->h += 2 * style->boxspace; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs