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.
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user