Add support of wxFONTSTYLE_SLANT to wxFont in wxQt

Closes https://github.com/wxWidgets/wxWidgets/pull/1034
This commit is contained in:
Liam Treacy 2018-11-28 13:11:36 +00:00 committed by Vadim Zeitlin
parent 16c121d4d3
commit 29f771ab82

View File

@ -469,9 +469,18 @@ void wxNativeFontInfo::SetPixelSize(const wxSize& size)
void wxNativeFontInfo::SetStyle(wxFontStyle style)
{
m_qtFont.setItalic(style == wxFONTSTYLE_ITALIC);
//case wxFONTSTYLE_SLANT:
//case wxFONTSTYLE_NORMAL:
switch(style)
{
case wxFONTSTYLE_ITALIC:
m_qtFont.setStyle(QFont::StyleItalic);
break;
case wxFONTSTYLE_NORMAL:
m_qtFont.setStyle(QFont::StyleNormal);
break;
case wxFONTSTYLE_SLANT:
m_qtFont.setStyle(QFont::StyleOblique);
break;
}
}
void wxNativeFontInfo::SetNumericWeight(int weight)