Closed Bug 930438 Opened 11 years ago Closed 11 years ago

[10.9] Menuitem text is not vertically centered on OS X Mavericks

Categories

(Toolkit :: Themes, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 931040

People

(Reporter: MattN, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The baseline of the text in the XUL menuitem is 2px too high but the top is only 1px too high so it seems like our font-size should increase by 1px and then re-aligned. Reported on a non-retina OS X 10.9 MBP See also bug 498252 for a previous change like this. It seems like we need to change nsLookAndFeel.mm again for eFont_PullDownMenu but I don't have time to figure out the right value at the moment.
This may just be caused by the font issue in bug 931040
I looked at the return value of [NSFont menuBarFontOfSize:0.0] and in 10.9 it seems to indeed return ".LucidaGrandeUI" font (here is the output of NSLog(@"### font %@", [NSFont menuBarFontOfSize:0.0]); 2013-11-26 14:59:51.529 firefox[17883:507] ### font ".LucidaGrandeUI 14.00 pt. P [] (0x11ef7e370) fobj=0x11cadd300, spc=4.43" I tried replacing it with a hard coded "Lucida Grande" font and it fixes the issue, so there is something odd with font metrics (how does Firefox decide how tall the popup menu items should be?) This hack fixes the text rendering issues: case eFont_PullDownMenu: //font = [NSFont menuBarFontOfSize:0.0]; font = [NSFont fontWithName:@"Lucida Grande" size:0.0];
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: