From 8bce6066cae61b375cb944ff14c8bb110dff57ee Mon Sep 17 00:00:00 2001 From: freq Date: Thu, 16 Jan 2014 16:23:02 +0000 Subject: [PATCH] Cocoa: Fix #0025526 TLabel Font handling git-svn-id: trunk@43733 - --- lcl/interfaces/cocoa/cocoagdiobjects.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/cocoa/cocoagdiobjects.pas b/lcl/interfaces/cocoa/cocoagdiobjects.pas index dfd6dba8d4..a8acef056a 100644 --- a/lcl/interfaces/cocoa/cocoagdiobjects.pas +++ b/lcl/interfaces/cocoa/cocoagdiobjects.pas @@ -915,11 +915,16 @@ begin FTextStorage.addAttribute_value_range(NSFontAttributeName, FFont.Font, Range); // aply font attributes which are not in NSFont if cfs_Underline in FFont.Style then - FTextStorage.addAttribute_value_range(NSUnderlineStyleAttributeName, NSNumber.numberWithInteger(UnderlineStyle), Range); + FTextStorage.addAttribute_value_range(NSUnderlineStyleAttributeName, NSNumber.numberWithInteger(UnderlineStyle), Range) + else + FTextStorage.removeAttribute_range(NSUnderlineStyleAttributeName, Range); + if cfs_Strikeout in FFont.Style then FTextStorage.addAttribute_value_range(NSStrikethroughStyleAttributeName, NSNumber.numberWithInteger(UnderlineStyle), Range) else FTextStorage.removeAttribute_range(NSStrikethroughStyleAttributeName, Range); + + end; end;