mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-03 08:30:09 +00:00
nsmenu.m (EmacsTooltip: setText): set height of tooltip.
This commit is contained in:
parent
4b7f335c11
commit
5ee6f6296a
@ -1,3 +1,7 @@
|
||||
2009-06-14 Sidney Markowitz <sidney@sidney.com>
|
||||
|
||||
* nsmenu.m (EmacsTooltip: setText): set height of tooltip.
|
||||
|
||||
2009-06-14 Adrian Robert <Adrian.B.Robert@gmail.com>
|
||||
|
||||
* nsfont.m (ns_attribute_value): Remove.
|
||||
|
@ -1439,7 +1439,14 @@ - (void) setText: (char *)text
|
||||
{
|
||||
NSString *str = [NSString stringWithUTF8String: text];
|
||||
NSRect r = [textField frame];
|
||||
r.size.width = [[[textField font] screenFont] widthOfString: str] + 8;
|
||||
NSSize textSize = [str sizeWithAttributes:
|
||||
[NSDictionary dictionaryWithObject: [[textField font] screenFont]
|
||||
forKey: NSFontAttributeName]];
|
||||
NSSize padSize = [[[textField font] screenFont]
|
||||
boundingRectForFont].size;
|
||||
|
||||
r.size.width = textSize.width + padSize.width/2;
|
||||
r.size.height = textSize.height + padSize.height/2;
|
||||
[textField setFrame: r];
|
||||
[textField setStringValue: str];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user