Attempt to tweak the button spacing in the main toolbar. Also fixes auto hiding/showing of buttons in the main and secondary toolbars when resizing the viewer.