mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-19 04:21:45 -07:00
nsmenu.m (EmacsTooltip: setText): set height of tooltip.
This commit is contained in:
parent
4b7f335c11
commit
5ee6f6296a
2 changed files with 12 additions and 1 deletions
|
|
@ -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 @@ update_frame_tool_bar (FRAME_PTR f)
|
|||
{
|
||||
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…
Add table
Add a link
Reference in a new issue