Function to toggle panel icons