Commit: a03eadaec86ae8f3db819b11f89c4673eff68233
Author: Campbell Barton
Date:   Wed Jun 13 08:24:56 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBa03eadaec86ae8f3db819b11f89c4673eff68233

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.

===================================================================

M       source/blender/editors/interface/interface_templates.c
M       source/blender/editors/screen/area.c

===================================================================

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 
*/

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to