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:
@@ -409,6 +409,7 @@ void wxFontRefData::CreateATSUFont()
|
|||||||
kATSUQDUnderlineTag ,
|
kATSUQDUnderlineTag ,
|
||||||
kATSUQDCondensedTag ,
|
kATSUQDCondensedTag ,
|
||||||
kATSUQDExtendedTag ,
|
kATSUQDExtendedTag ,
|
||||||
|
kATSUStyleStrikeThroughTag
|
||||||
};
|
};
|
||||||
ByteCount atsuSizes[WXSIZEOF(atsuTags)] =
|
ByteCount atsuSizes[WXSIZEOF(atsuTags)] =
|
||||||
{
|
{
|
||||||
@@ -420,6 +421,7 @@ void wxFontRefData::CreateATSUFont()
|
|||||||
sizeof( Boolean ) ,
|
sizeof( Boolean ) ,
|
||||||
sizeof( Boolean ) ,
|
sizeof( Boolean ) ,
|
||||||
sizeof( Boolean ) ,
|
sizeof( Boolean ) ,
|
||||||
|
sizeof( Boolean )
|
||||||
};
|
};
|
||||||
|
|
||||||
Boolean kTrue = true ;
|
Boolean kTrue = true ;
|
||||||
@@ -438,6 +440,7 @@ void wxFontRefData::CreateATSUFont()
|
|||||||
(addQDStyle & underline) ? &kTrue : &kFalse ,
|
(addQDStyle & underline) ? &kTrue : &kFalse ,
|
||||||
(addQDStyle & condense) ? &kTrue : &kFalse ,
|
(addQDStyle & condense) ? &kTrue : &kFalse ,
|
||||||
(addQDStyle & extend) ? &kTrue : &kFalse ,
|
(addQDStyle & extend) ? &kTrue : &kFalse ,
|
||||||
|
m_info.m_strikethrough ? & kTrue : &kFalse
|
||||||
};
|
};
|
||||||
|
|
||||||
status = ::ATSUSetAttributes(
|
status = ::ATSUSetAttributes(
|
||||||
|
Reference in New Issue
Block a user