implements toggling the visibility of toolbar