* Source/GSToolTips.m (-_timedOut:): Break long tool tips into

multiple lines.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39130 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2015-11-03 08:33:31 +00:00
parent 810192f7e5
commit e61577a98f
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2015-11-03 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSToolTips.m (-_timedOut:): Break long tool tips into
multiple lines.
2015-11-02 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSWindow.m (-constrainFrameRect:toScreen:) Handle screen

View file

@ -642,6 +642,15 @@ static BOOL restoreMouseMoved;
[[NSAttributedString alloc] initWithString: toolTipString
attributes: attributes];
textSize = [toolTipText size];
if (textSize.width > 300)
{
NSRect rect;
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;
}
/* Create window just off the current mouse position
* Constrain it to be on screen, shrinking if necessary.