resize panels based on their open state