Turn buttons into toggles

Make Legend, Detail and Editor Buttons act like toggles to hide/show
the panel.