Refactored ProjectWidget::getCategoryItem.