Properly resize the directions panel (with scrollbars)