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.
This commit is contained in:
Vadim Zeitlin 2018-09-14 19:23:40 +02:00
parent 8715e56676
commit ce1e69cfa1

View File

@ -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);