From e0a3ca05480971ffacc7981a3e9835d9a7618259 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 12 Jun 2012 22:00:00 +1000 Subject: Fix truncation of descenders and underscores in list box. From Mike Lischke. --- cocoa/PlatCocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index fc7d7c222..937edbf00 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1611,7 +1611,7 @@ void ListBoxImpl::SetFont(Font& font_) font.SetID(new QuartzTextStyle(*style)); NSFont *pfont = (NSFont *)style->getFontRef(); [[colText dataCell] setFont: pfont]; - CGFloat itemHeight = lround([pfont ascender] - [pfont descender]); + CGFloat itemHeight = ceil([pfont boundingRectForFont].size.height); [table setRowHeight:itemHeight]; } -- cgit v1.2.3