forked from bartvdbraak/blender
UI: Matt, check space_outliner.c diff to see how to get python
layouts in a header.
This commit is contained in:
parent
a741cbff82
commit
ce334b1cd9
@ -16,7 +16,7 @@ class OUTLINER_HT_header(bpy.types.Header):
|
||||
row.itemM(context, "OUTLINER_MT_view")
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.itemR(so, "display_mode")
|
||||
row.itemR(so, "display_mode", text="")
|
||||
|
||||
class OUTLINER_MT_view(bpy.types.Menu):
|
||||
__space_type__ = "OUTLINER"
|
||||
|
@ -655,7 +655,7 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PropertyRNA
|
||||
subtype= RNA_property_subtype(prop);
|
||||
len= RNA_property_array_length(prop);
|
||||
|
||||
if(type == PROP_STRING)
|
||||
if(ELEM(type, PROP_STRING, PROP_ENUM))
|
||||
w += 10*UI_UNIT_X;
|
||||
|
||||
/* increase height for arrays */
|
||||
|
@ -143,14 +143,23 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
||||
|
||||
/* ************************ header outliner area region *********************** */
|
||||
|
||||
//#define PY_HEADER
|
||||
|
||||
/* add handlers, stuff you only do once or on area/region changes */
|
||||
static void outliner_header_area_init(wmWindowManager *wm, ARegion *ar)
|
||||
{
|
||||
#ifdef PY_HEADER
|
||||
ED_region_header_init(ar);
|
||||
#else
|
||||
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void outliner_header_area_draw(const bContext *C, ARegion *ar)
|
||||
{
|
||||
#ifdef PY_HEADER
|
||||
ED_region_header(C, ar);
|
||||
#else
|
||||
float col[3];
|
||||
|
||||
if(ED_screen_area_active(C))
|
||||
@ -165,6 +174,7 @@ static void outliner_header_area_draw(const bContext *C, ARegion *ar)
|
||||
UI_view2d_view_ortho(C, &ar->v2d);
|
||||
|
||||
outliner_header_buttons(C, ar);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void outliner_header_area_free(ARegion *ar)
|
||||
|
Loading…
Reference in New Issue
Block a user