Dialog: Introduce fix for invisible custom footer actions still taking up space
Currently invisible custom footer actions take up space in the toolbar (even if the button is set to 0 width) due to some Qt bug with DialogButtonBox.
Introduce a fix here so that it only loads a button if it is visible.