[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59434] trunk/blender/source/blender/ editors/interface/interface_layout.c: UI layout: Fix the fact that children layouts were implicitely inconditionnaly aligned when the parent was .

Bastien Montagne montagne29 at wanadoo.fr
Fri Aug 23 18:53:37 CEST 2013


Revision: 59434
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59434
Author:   mont29
Date:     2013-08-23 16:53:37 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
UI layout: Fix the fact that children layouts were implicitely inconditionnaly aligned when the parent was. E.g.in

col = layout.column(True)
row = col.row(False)

Items in row would be 'aligned' in the same group as those in col. Now to get this happening, you have to set row as aligned as well.

Please note that fixes for py UI scripts will follow in another commit.

Also fixed labels of RNA pointers searchboxes, which were missing the colon!

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_layout.c

Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c	2013-08-23 16:52:24 UTC (rev 59433)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c	2013-08-23 16:53:37 UTC (rev 59434)
@@ -568,7 +568,7 @@
 	PropertySubType subtype;
 	int labelw;
 
-	sub = uiLayoutRow(layout, FALSE);
+	sub = uiLayoutRow(layout, layout->align);
 	uiBlockSetCurLayout(block, sub);
 
 	if (name[0]) {
@@ -1465,6 +1465,7 @@
 	uiBlock *block;
 	StructRNA *icontype;
 	int w, h;
+	char namestr[UI_MAX_NAME_STR];
 	
 	/* validate arguments */
 	prop = RNA_struct_find_property(ptr, propname);
@@ -1507,6 +1508,8 @@
 	if (!name)
 		name = RNA_property_ui_name(prop);
 
+	name = ui_item_name_add_colon(name, namestr);
+
 	/* create button */
 	block = uiLayoutGetBlock(layout);
 
@@ -2678,8 +2681,9 @@
 			BLI_remlink(&litem->root->block->buttons, box->roundbox);
 			BLI_addhead(&litem->root->block->buttons, box->roundbox);
 		}
-		else
+		else if (((uiLayout *)item)->align) {
 			ui_item_align((uiLayout *)item, nr);
+		}
 	}
 }
 




More information about the Bf-blender-cvs mailing list