UI:
* Don't call generic layout hints templates anymore, i.e. TemplateRow becomes Row, etc. * Added more general layout nesting, using uiLayoutSplit() and uiLayoutBox() functions, for which the sublayouts can then be accessed using uiLayoutSub(), to put items in those sublayouts. * Some steps to make the layout decisions, like which items to put in which columns, independent of the width of the window or the text in the buttons. We want the layout to be stable under resizes and translations. * Added an "expand" parameter to uiItemR, used now to expand enums into a row instead of using a menu.
This commit is contained in:
@@ -299,7 +299,7 @@ int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
|
||||
|
||||
layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, x, y, DEF_BUT_WIDTH*2, 0);
|
||||
|
||||
uiTemplateColumn(layout);
|
||||
uiLayoutColumn(layout);
|
||||
uiItemL(layout, (char*)RNA_struct_ui_name(ptr), 0);
|
||||
|
||||
iterprop= RNA_struct_iterator_property(ptr);
|
||||
@@ -311,13 +311,11 @@ int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
|
||||
if(strcmp(RNA_property_identifier(ptr, prop), "rna_type") == 0)
|
||||
continue;
|
||||
|
||||
uiTemplateColumn(layout);
|
||||
uiLayoutSplit(layout, 2, 0);
|
||||
|
||||
name= (char*)RNA_property_ui_name(ptr, prop);
|
||||
uiTemplateSlot(layout, UI_TSLOT_COLUMN_1);
|
||||
uiItemL(layout, name, 0);
|
||||
uiTemplateSlot(layout, UI_TSLOT_COLUMN_2);
|
||||
uiItemR(layout, "", 0, ptr, (char*)RNA_property_identifier(ptr, prop));
|
||||
uiItemL(uiLayoutSub(layout, 0), name, 0);
|
||||
uiItemFullR(uiLayoutSub(layout, 1), "", 0, ptr, prop, -1, 0);
|
||||
}
|
||||
|
||||
RNA_property_collection_end(&iter);
|
||||
|
||||
Reference in New Issue
Block a user