adjust component's size to prevent text loss