Fix for issue #9046.

Removing classes that add extra padding on the toolbar, to be merged to the stable branch.