From ce1e69cfa15595ae2053bdce12a5b7cf99d67df2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 14 Sep 2018 19:23:40 +0200 Subject: [PATCH] Implement wxNativeFontInfo::SetPixelSize() in wxQt There doesn't seem to be any way to specify both font width and height and pixels in Qt API, so just use QFont::setPixelSize() with the height. --- src/qt/font.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qt/font.cpp b/src/qt/font.cpp index ce2b2f6b33..fa4dfc545a 100644 --- a/src/qt/font.cpp +++ b/src/qt/font.cpp @@ -445,6 +445,11 @@ void wxNativeFontInfo::SetFractionalPointSize(float pointsize) m_qtFont.setPointSizeF(pointsize); } +void wxNativeFontInfo::SetPixelSize(const wxSize& size) +{ + m_qtFont.setPixelSize(size.GetHeight()); +} + void wxNativeFontInfo::SetStyle(wxFontStyle style) { m_qtFont.setItalic(style == wxFONTSTYLE_ITALIC);