Made toolbar resize intelligently.