changes tooltip's bounding box according to text length