diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-13 09:24:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-13 09:26:16 +0300 |
commit | a03eadaec86ae8f3db819b11f89c4673eff68233 (patch) | |
tree | 2330d85a5e0ab7e57c3c4f75c4cb7766dbf362d1 | |
parent | fc0b21ff732019ccd7ed3910a8b76adda23201d7 (diff) |
UI: redo panel layout tweaks
- Don't use compact layout (enum titles were hidden).
- Split-properties to use less vertical space.
- Make panel wider, half width when collapsed.
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 8 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 70b591d3a69..c2f6dab5c7b 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1578,12 +1578,16 @@ void uiTemplateOperatorRedoProperties(uiLayout *layout, const bContext *C) #endif if (WM_operator_repeat_check(C, op)) { + int layout_flags = 0; + if (block->panel == NULL) { + layout_flags = UI_TEMPLATE_OP_PROPS_SHOW_TITLE; + } #if 0 bool has_advanced = false; #endif UI_block_func_set(block, ED_undo_operator_repeat_cb, op, NULL); - template_operator_redo_property_buts_draw(C, op, layout, UI_TEMPLATE_OP_PROPS_COMPACT, NULL /* &has_advanced */ ); + template_operator_redo_property_buts_draw(C, op, layout, layout_flags, NULL /* &has_advanced */ ); UI_block_func_set(block, NULL, NULL, NULL); /* may want to reset to old state instead of NULLing all */ #if 0 @@ -3952,6 +3956,8 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs( RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); + uiLayoutSetPropSep(layout, true); + /* main draw call */ return_info = uiDefAutoButsRNA(layout, &ptr, check_prop, label_align, (flag & UI_TEMPLATE_OP_PROPS_COMPACT)); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 9abc56d369b..6f6e5f2bc9c 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2063,7 +2063,7 @@ void ED_region_panels_layout_ex( Panel *panel = ar->panels.last; if (panel != NULL) { int size_dyn[2] = { - UI_UNIT_X * 12, + UI_UNIT_X * ((panel->flag & PNL_CLOSED) ? 8 : 14), UI_panel_size_y(panel), }; /* region size is layout based and needs to be updated */ |