From f2c9652692aa996a5739b41d2d893cdc4077e754 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 4 Jun 2011 21:22:30 +1000 Subject: Fixed compilation failure retrieving NSFont* from Font. --- cocoa/PlatCocoa.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(font_.GetID()); + NSFont *pfont = (NSFont *)style->getFontRef(); [[colText dataCell] setFont: pfont]; CGFloat itemHeight = lround([pfont ascender] - [pfont descender]); [table setRowHeight:itemHeight]; -- cgit v1.2.3