Moved up the tooltip from 10px.

Also factorised the calculation of the tooltip position.