You can use "View -> Collapse All" to collapse all trees, or the equivalent keyboard shortcut combination, Ctrl+Left (i.e., the Ctrl and Left Arrow keys).