Fix: width of UILayout.prop_enum() buttons
authorraa <roaoao@gmail.com>
Tue, 11 Apr 2017 10:25:46 +0000 (13:25 +0300)
committerraa <roaoao@gmail.com>
Tue, 11 Apr 2017 10:25:46 +0000 (13:25 +0300)
source/blender/editors/interface/interface_layout.c

index 9b6547cf8a1b8c80344e373fe37cf37be5482ec1..30a2094fee717475f0c21106e9d9932eef570419 100644 (file)
@@ -1274,7 +1274,8 @@ static void ui_item_rna_size(
        if (!w) {
                if (type == PROP_ENUM && icon_only) {
                        w = ui_text_icon_width(layout, "", ICON_BLANK1, 0);
        if (!w) {
                if (type == PROP_ENUM && icon_only) {
                        w = ui_text_icon_width(layout, "", ICON_BLANK1, 0);
-                       w += 0.6f * UI_UNIT_X;
+                       if (index != RNA_ENUM_VALUE)
+                               w += 0.6f * UI_UNIT_X;
                }
                else {
                        w = ui_text_icon_width(layout, name, icon, 0);
                }
                else {
                        w = ui_text_icon_width(layout, name, icon, 0);