Cocoa: Fix #0025526 TLabel Font handling

git-svn-id: trunk@43733 -
This commit is contained in:
freq 2014-01-16 16:23:02 +00:00
parent df1425b1ec
commit 8bce6066ca

View File

@ -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;