From cc81acecc1c89f0fefd036c33c3ef52d900b85f5 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Fri, 22 May 2015 03:12:41 +0400 Subject: [PATCH] Make use of strike-through when creating an ATSU font This makes the wxTextCtrl in the font sample under OS X support showing a stricken-through font when using ATSU (which by default is used by OSX/Carbon). It doesn't work for other controls such as a wxButton and wxStaticText but at least it's a slight improvement from only working with DrawText (which was added in 9ecf3170). --- src/osx/carbon/font.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 8eaafca8f7..3b26548c3e 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -409,6 +409,7 @@ void wxFontRefData::CreateATSUFont() kATSUQDUnderlineTag , kATSUQDCondensedTag , kATSUQDExtendedTag , + kATSUStyleStrikeThroughTag }; ByteCount atsuSizes[WXSIZEOF(atsuTags)] = { @@ -420,6 +421,7 @@ void wxFontRefData::CreateATSUFont() sizeof( Boolean ) , sizeof( Boolean ) , sizeof( Boolean ) , + sizeof( Boolean ) }; Boolean kTrue = true ; @@ -438,6 +440,7 @@ void wxFontRefData::CreateATSUFont() (addQDStyle & underline) ? &kTrue : &kFalse , (addQDStyle & condense) ? &kTrue : &kFalse , (addQDStyle & extend) ? &kTrue : &kFalse , + m_info.m_strikethrough ? & kTrue : &kFalse }; status = ::ATSUSetAttributes(