implements the toggling of visibility of toolbar