resize logic for bottom toolbar