Don't round the larger or smaller font sizes unnecessarily

Use SetFractionalPointSize() instead of SetPointSize() to avoid losing
the fractional part of the font size, if any.
This commit is contained in:
Vadim Zeitlin
2018-09-15 12:43:17 +02:00
parent 85b8798558
commit 03f29d4b67
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren
nameAndVersion << wxT(' ') << info.GetVersion();
wxStaticText *label = new wxStaticText(this, wxID_ANY, nameAndVersion);
wxFont fontBig(*wxNORMAL_FONT);
fontBig.SetPointSize(fontBig.GetPointSize() + 2);
fontBig.SetFractionalPointSize(fontBig.GetFractionalPointSize() + 2.0);
fontBig.SetWeight(wxFONTWEIGHT_BOLD);
label->SetFont(fontBig);

View File

@@ -2056,7 +2056,7 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize
#ifdef __WXGTK__
wxFont font = GetFont();
font.SetPointSize(font.GetPointSize()-2);
font.SetFractionalPointSize(font.GetFractionalPointSize()-2);
but->SetFont(font);
#else
but->SetFont(GetFont());