Changed handling of tooltip size calculation.