Add extra pixels to tooltip

This commit is contained in:
Gregory John Casamento 2021-10-27 11:59:39 -04:00
parent 58359b8de3
commit e9548dd057
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2021-10-27 Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSToolTips.m: Add extra pixels so that tool tip doesn't
overrun the window.
2021-10-25 Riccardo Mottola <rm@gnu.org>
* Source/NSTextStorage.m:

View file

@ -649,10 +649,12 @@ static BOOL restoreMouseMoved;
rect = [toolTipText boundingRectWithSize: NSMakeSize(300, 1e7)
options: 0];
textSize = rect.size;
// This extra pixel is needed, otherwise the last line gets cut off.
textSize.height += 1;
}
// Need to fudge the result just a bit due to occasionally cutoff characters...
textSize.width += 1;
textSize.height += 1;
/* Create window just off the current mouse position
* Constrain it to be on screen, shrinking if necessary.
*/