FIXED: Some tooltips was truncated

This patch adds a small size adjustment when we compute the size of the
tooltip. It seems to fix all truncated tooltips problem.
This commit is contained in:
Antoine Mercadal committed 2014-08-28 19:02:22 -07:00
1 parent 3f4ba87079
commit b92214461e
1 file changed
+6
+6
View File
@@ -118,6 +118,12 @@ var _CPToolTipHeight = 24.0,
textFrameSizeSingleLine = [aText sizeWithFont:font],
textFrameSize = [aText sizeWithFont:font inWidth:(aToolTipSize.width)];
// this small adjustement seems to fix all
// tooltips sizing issues. Now I'm not sure why
// we need this.
textFrameSizeSingleLine.width += 1;
textFrameSize.width += 1;
// If the text fully fits within the maximum width, shrink to fit.
if (textFrameSizeSingleLine.width < aToolTipSize.width)
{