UI: Bevel: Show Offset type before offset amount
Because this controls how the amount is used in should be set first and is more important therefor place it at the top. This is also consistent with other areas in Blender
This commit is contained in:
@@ -938,6 +938,9 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op)
|
||||
|
||||
RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
|
||||
|
||||
col = uiLayoutRow(layout, true);
|
||||
uiItemR(col, &ptr, "offset_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
|
||||
|
||||
if (RNA_enum_get(&ptr, "offset_type") == BEVEL_AMT_PERCENT) {
|
||||
uiItemR(layout, &ptr, "offset_pct", 0, NULL, ICON_NONE);
|
||||
}
|
||||
@@ -958,8 +961,6 @@ static void edbm_bevel_ui(bContext *C, wmOperator *op)
|
||||
C, op->ptr, prop, RNA_property_enum_get(op->ptr, prop), &offset_name);
|
||||
uiItemR(layout, &ptr, "offset", 0, offset_name, ICON_NONE);
|
||||
}
|
||||
row = uiLayoutRow(layout, true);
|
||||
uiItemR(row, &ptr, "offset_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
|
||||
|
||||
split = uiLayoutSplit(layout, 0.5f, true);
|
||||
col = uiLayoutColumn(split, true);
|
||||
|
||||
@@ -287,6 +287,8 @@ static void panel_draw(const bContext *C, Panel *panel)
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
|
||||
col = uiLayoutColumn(layout, false);
|
||||
uiItemR(col, &ptr, "offset_type", 0, NULL, ICON_NONE);
|
||||
|
||||
const char *offset_name = "";
|
||||
if (RNA_enum_get(&ptr, "offset_type") == BEVEL_AMT_PERCENT) {
|
||||
uiItemR(col, &ptr, "width_pct", 0, NULL, ICON_NONE);
|
||||
@@ -305,7 +307,6 @@ static void panel_draw(const bContext *C, Panel *panel)
|
||||
}
|
||||
uiItemR(col, &ptr, "width", 0, IFACE_(offset_name), ICON_NONE);
|
||||
}
|
||||
uiItemR(col, &ptr, "offset_type", 0, NULL, ICON_NONE);
|
||||
|
||||
uiItemR(layout, &ptr, "segments", 0, NULL, ICON_NONE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user