From 29f771ab826a871bfcb23eba87ca01b0fed3e364 Mon Sep 17 00:00:00 2001 From: Liam Treacy Date: Wed, 28 Nov 2018 13:11:36 +0000 Subject: [PATCH] Add support of wxFONTSTYLE_SLANT to wxFont in wxQt Closes https://github.com/wxWidgets/wxWidgets/pull/1034 --- src/qt/font.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qt/font.cpp b/src/qt/font.cpp index 79e66fc81a..7e328d099a 100644 --- a/src/qt/font.cpp +++ b/src/qt/font.cpp @@ -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)