Aplied patch [ 816113 ] Inconsistent GetCharWidth over platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3371,7 +3371,7 @@ int wxWindowGTK::GetCharWidth() const
|
|||||||
PangoFontDescription *desc = m_font.GetNativeFontInfo()->description;
|
PangoFontDescription *desc = m_font.GetNativeFontInfo()->description;
|
||||||
PangoLayout *layout = pango_layout_new(context);
|
PangoLayout *layout = pango_layout_new(context);
|
||||||
pango_layout_set_font_description(layout, desc);
|
pango_layout_set_font_description(layout, desc);
|
||||||
pango_layout_set_text(layout, "H", 1);
|
pango_layout_set_text(layout, "g", 1);
|
||||||
PangoLayoutLine *line = (PangoLayoutLine *)pango_layout_get_lines(layout)->data;
|
PangoLayoutLine *line = (PangoLayoutLine *)pango_layout_get_lines(layout)->data;
|
||||||
|
|
||||||
PangoRectangle rect;
|
PangoRectangle rect;
|
||||||
@@ -3383,7 +3383,7 @@ int wxWindowGTK::GetCharWidth() const
|
|||||||
#else
|
#else
|
||||||
GdkFont *font = m_font.GetInternalFont( 1.0 );
|
GdkFont *font = m_font.GetInternalFont( 1.0 );
|
||||||
|
|
||||||
return gdk_string_width( font, "H" );
|
return gdk_string_width( font, "g" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3371,7 +3371,7 @@ int wxWindowGTK::GetCharWidth() const
|
|||||||
PangoFontDescription *desc = m_font.GetNativeFontInfo()->description;
|
PangoFontDescription *desc = m_font.GetNativeFontInfo()->description;
|
||||||
PangoLayout *layout = pango_layout_new(context);
|
PangoLayout *layout = pango_layout_new(context);
|
||||||
pango_layout_set_font_description(layout, desc);
|
pango_layout_set_font_description(layout, desc);
|
||||||
pango_layout_set_text(layout, "H", 1);
|
pango_layout_set_text(layout, "g", 1);
|
||||||
PangoLayoutLine *line = (PangoLayoutLine *)pango_layout_get_lines(layout)->data;
|
PangoLayoutLine *line = (PangoLayoutLine *)pango_layout_get_lines(layout)->data;
|
||||||
|
|
||||||
PangoRectangle rect;
|
PangoRectangle rect;
|
||||||
@@ -3383,7 +3383,7 @@ int wxWindowGTK::GetCharWidth() const
|
|||||||
#else
|
#else
|
||||||
GdkFont *font = m_font.GetInternalFont( 1.0 );
|
GdkFont *font = m_font.GetInternalFont( 1.0 );
|
||||||
|
|
||||||
return gdk_string_width( font, "H" );
|
return gdk_string_width( font, "g" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1679,7 +1679,7 @@ wxCoord wxDC::GetCharWidth(void) const
|
|||||||
if ( UMAGetSystemVersion() < 0x1000 || ((wxFont*)&m_font)->GetNoAntiAliasing() )
|
if ( UMAGetSystemVersion() < 0x1000 || ((wxFont*)&m_font)->GetNoAntiAliasing() )
|
||||||
useGetThemeText = false ;
|
useGetThemeText = false ;
|
||||||
#endif
|
#endif
|
||||||
char text[] = "H" ;
|
char text[] = "g" ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useGetThemeText )
|
if ( useGetThemeText )
|
||||||
{
|
{
|
||||||
|
@@ -1679,7 +1679,7 @@ wxCoord wxDC::GetCharWidth(void) const
|
|||||||
if ( UMAGetSystemVersion() < 0x1000 || ((wxFont*)&m_font)->GetNoAntiAliasing() )
|
if ( UMAGetSystemVersion() < 0x1000 || ((wxFont*)&m_font)->GetNoAntiAliasing() )
|
||||||
useGetThemeText = false ;
|
useGetThemeText = false ;
|
||||||
#endif
|
#endif
|
||||||
char text[] = "H" ;
|
char text[] = "g" ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( useGetThemeText )
|
if ( useGetThemeText )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user