Switch to using float for point size in wxNativeFontInfo
Use float as the fundamental type for the font size and implement wxNativeFontInfo::{Set,Get}PointSize() as wrappers around the new {Set,Get}FractionalPointSize(). Update wxNativeFontInfo for all platforms and replace the use of its SetPointSize() method with SetFractionalPointSize() in wxFont for the platforms already supporting fractional point sizes (don't change the others just yet). Note that wxNativeFontInfo::{Get,Set}PointSize() are preserved for backwards compatibility but shouldn't be used in any code inside the library itself any more (again, this is not the case yet, but will be soon).
This commit is contained in:
@@ -315,9 +315,9 @@ void wxNativeFontInfo::Init()
|
||||
{
|
||||
}
|
||||
|
||||
int wxNativeFontInfo::GetPointSize() const
|
||||
float wxNativeFontInfo::GetFractionalPointSize() const
|
||||
{
|
||||
return m_qtFont.pointSize();
|
||||
return m_qtFont.pointSizeF();
|
||||
}
|
||||
|
||||
wxFontStyle wxNativeFontInfo::GetStyle() const
|
||||
@@ -412,9 +412,9 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const
|
||||
return wxFONTENCODING_MAX;
|
||||
}
|
||||
|
||||
void wxNativeFontInfo::SetPointSize(int pointsize)
|
||||
void wxNativeFontInfo::SetFractionalPointSize(float pointsize)
|
||||
{
|
||||
m_qtFont.setPointSize(pointsize);
|
||||
m_qtFont.setPointSizeF(pointsize);
|
||||
}
|
||||
|
||||
void wxNativeFontInfo::SetStyle(wxFontStyle style)
|
||||
|
Reference in New Issue
Block a user