Collapse empty button toolbars in dialogs
Factor out a variable
Merge pull request #2531 from ussuri/improve-toolbars-in-dialogs

Improve footer toolbars in dialogs