diff options
-rw-r--r-- | cocoa/PlatCocoa.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index a9ac95461..83ef691e5 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1456,7 +1456,8 @@ void ListBoxImpl::SetFont(Font& font_) font.SetID(font_.GetID()); // NSCell setFont takes an NSFont* rather than a CTFontRef but they // are the same thing toll-free bridged. - NSFont* pfont = (NSFont*)FontRef(font_); + QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID()); + NSFont *pfont = (NSFont *)style->getFontRef(); [[colText dataCell] setFont: pfont]; CGFloat itemHeight = lround([pfont ascender] - [pfont descender]); [table setRowHeight:itemHeight]; |