Actually, it already can do this
You just need to switch the widget mode to "tree" by creating a custom module and
decorating the "defineWidgetParams()" method in the \XLite\View\TopCategories class as follows:
PHP Code:
/**
* Define widget parameters
*
* @return void
*/
protected function defineWidgetParams()
{
parent::defineWidgetParams();
$this->widgetParams[static::PARAM_DISPLAY_MODE]->setValue(static::DISPLAY_MODE_TREE);
}
This should make the widget to generate HTML for the full categories tree (however, out of the box there are no CSS classes to display the tree properly, so you should add them yourself in your module).