[Bf-blender-cvs] [53c9fbef606] ui_layout_gridflow: Merge branch 'master' into ui_layout_gridflow

Bastien Montagne noreply at git.blender.org
Sat Jun 2 19:21:05 CEST 2018


Commit: 53c9fbef606f34d2a8d8da8c982448490d29d5fb
Author: Bastien Montagne
Date:   Sat Jun 2 18:34:07 2018 +0200
Branches: ui_layout_gridflow
https://developer.blender.org/rB53c9fbef606f34d2a8d8da8c982448490d29d5fb

Merge branch 'master' into ui_layout_gridflow

===================================================================



===================================================================

diff --cc source/blender/editors/interface/interface_layout.c
index 46563326723,e267661ec21..bd79ab3e196
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@@ -246,9 -242,12 +259,12 @@@ static int ui_text_icon_width(uiLayout 
  	if (icon && !name[0])
  		return UI_UNIT_X;  /* icon only */
  
 -	variable = (ui_layout_vary_direction(layout) == UI_ITEM_VARY_X);
 +	variable = (ui_layout_vary_direction(layout) == UI_ITEM_VARY_X || true); /* XXX HACK, not to be committed! */
  
  	if (variable) {
+ 		if (layout->alignment != UI_LAYOUT_ALIGN_EXPAND) {
+ 			layout->item.flag |= UI_ITEM_MIN;
+ 		}
  		const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
  		/* it may seem odd that the icon only adds (UI_UNIT_X / 4)
  		 * but taking margins into account its fine */
@@@ -1264,10 -1360,10 +1378,10 @@@ static void ui_item_rna_size
  		else
  			h += len * UI_UNIT_Y;
  	}
 -	else if (ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) {
 +	else if (ui_layout_vary_direction(layout) == UI_ITEM_VARY_X || true) {  /* XXX HACK! No to be committed! */
  		if (type == PROP_BOOLEAN && name[0])
  			w += UI_UNIT_X / 5;
- 		else if (type == PROP_ENUM)
+ 		else if (type == PROP_ENUM && !icon_only)
  			w += UI_UNIT_X / 4;
  		else if (type == PROP_FLOAT || type == PROP_INT)
  			w += UI_UNIT_X * 3;



More information about the Bf-blender-cvs mailing list