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:
@@ -445,6 +445,11 @@ void wxNativeFontInfo::SetFractionalPointSize(float pointsize)
|
|||||||
m_qtFont.setPointSizeF(pointsize);
|
m_qtFont.setPointSizeF(pointsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxNativeFontInfo::SetPixelSize(const wxSize& size)
|
||||||
|
{
|
||||||
|
m_qtFont.setPixelSize(size.GetHeight());
|
||||||
|
}
|
||||||
|
|
||||||
void wxNativeFontInfo::SetStyle(wxFontStyle style)
|
void wxNativeFontInfo::SetStyle(wxFontStyle style)
|
||||||
{
|
{
|
||||||
m_qtFont.setItalic(style == wxFONTSTYLE_ITALIC);
|
m_qtFont.setItalic(style == wxFONTSTYLE_ITALIC);
|
||||||
|
Reference in New Issue
Block a user