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
).
This commit is contained in:
parent
d601e0efd8
commit
cc81acecc1
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user