Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-10-17 00:02:37 +0300
committerHans Goudey <h.goudey@me.com>2020-10-17 00:03:45 +0300
commit3bc808ebcbf64d35c9b42e9f6e0c1d03d0d6cc31 (patch)
tree8a3fbd057aa3d96de78c0be9598a2ab4e71ee646 /source/blender/modifiers/intern/MOD_decimate.c
parentc275a00a7232cc0a4e9b8410e2395c1588170a2c (diff)
UI: Tweak decimate modifier layout
- Expand the "Type" toggle at the top. This is consistent with other modifiers where there is a "Type" option at the top. It conveys the property's importance and makes it faster to switch it. - Expand the "Delimit" option vertically so the text isn't squashed. There isn't enough space on one line for this, and is has to be expanded because more than one option can be selected. This is also consistent with how "multi-select" enums are often displayed, like the 3D view snapping settings. | Before | After | | {F9000996} | {F9000985} |
Diffstat (limited to 'source/blender/modifiers/intern/MOD_decimate.c')
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index bf7b6493a36..2532afc933e 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -235,13 +235,13 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA ob_ptr;
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr);
- uiLayoutSetPropSep(layout, true);
-
int decimate_type = RNA_enum_get(ptr, "decimate_type");
char count_info[32];
snprintf(count_info, 32, "%s: %d", IFACE_("Face Count"), RNA_int_get(ptr, "face_count"));
- uiItemR(layout, ptr, "decimate_type", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "decimate_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+
+ uiLayoutSetPropSep(layout, true);
if (decimate_type == MOD_DECIM_MODE_COLLAPSE) {
uiItemR(layout, ptr, "ratio", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -268,7 +268,8 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
}
else { /* decimate_type == MOD_DECIM_MODE_DISSOLVE. */
uiItemR(layout, ptr, "angle_limit", 0, NULL, ICON_NONE);
- uiItemR(layout, ptr, "delimit", 0, NULL, ICON_NONE);
+ uiLayout *col = uiLayoutColumn(layout, false);
+ uiItemR(col, ptr, "delimit", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_dissolve_boundaries", 0, NULL, ICON_NONE);
}
uiItemL(layout, count_info, ICON_NONE);