UI: fix display of menu buttons without text and icon, and only a down arrow.
[blender.git] / source / blender / editors / interface / interface_layout.c
index 87927ef764327a8440f74f8286db3eaae0f962dc..eb1b86559bf4b5f59efee9f373aaf5df5512cb1f 100644 (file)
@@ -285,8 +285,8 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, bool
        bool variable;
        const int unit_x = UI_UNIT_X * (layout->scale[0] ? layout->scale[0] : 1.0f);
 
-       if (icon && !name[0])
-               return unit_x;  /* icon only */
+       if (!name[0])
+               return unit_x;  /* icon only or empty name */
 
        variable = ui_layout_variable_size(layout);