mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 23:30:58 +00:00
* 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:
parent
965bf3a195
commit
1bda3495ec
2 changed files with 14 additions and 0 deletions
|
@ -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>
|
2015-11-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSWindow.m (-constrainFrameRect:toScreen:) Handle screen
|
* Source/NSWindow.m (-constrainFrameRect:toScreen:) Handle screen
|
||||||
|
|
|
@ -642,6 +642,15 @@ static BOOL restoreMouseMoved;
|
||||||
[[NSAttributedString alloc] initWithString: toolTipString
|
[[NSAttributedString alloc] initWithString: toolTipString
|
||||||
attributes: attributes];
|
attributes: attributes];
|
||||||
textSize = [toolTipText size];
|
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
|
/* Create window just off the current mouse position
|
||||||
* Constrain it to be on screen, shrinking if necessary.
|
* Constrain it to be on screen, shrinking if necessary.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue