diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-08-23 20:53:37 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-08-23 20:53:37 +0400 |
commit | 5dacf174e67d84f89d5510729ce101c8004fb03a (patch) | |
tree | 69a93904073cb81c139c4e5383d42e6294a4736c /source/blender/editors/interface/interface_layout.c | |
parent | 384b8aafbf44e42557f3869d371cae2c4106d057 (diff) |
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!
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 079ba97aa9d..7ff7c279dcd 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -568,7 +568,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n PropertySubType subtype; int labelw; - sub = uiLayoutRow(layout, FALSE); + sub = uiLayoutRow(layout, layout->align); uiBlockSetCurLayout(block, sub); if (name[0]) { @@ -1465,6 +1465,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna 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 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna 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 @@ static void ui_item_align(uiLayout *litem, short nr) 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); + } } } |