Removed usage of GetInternalFont.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2003-01-05 22:57:45 +00:00
parent cba9ef7f73
commit 60d85ccb3d
4 changed files with 10 additions and 20 deletions

View File

@ -448,14 +448,11 @@ wxSize wxChoice::DoGetBestSize() const
ret.x = 0;
if ( m_widget )
{
GdkFont *font = m_font.GetInternalFont();
wxCoord width;
int width;
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
// FIXME GTK 2.0
width = (wxCoord)gdk_string_width(font, wxGTK_CONV( GetString(n) ) );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
if ( width > ret.x )
ret.x = width;
}

View File

@ -750,13 +750,11 @@ wxSize wxComboBox::DoGetBestSize() const
ret.x = 0;
if ( m_widget )
{
GdkFont *font = m_font.GetInternalFont();
wxCoord width;
size_t count = Number();
int width;
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
width = (wxCoord)gdk_string_width(font, wxGTK_CONV( GetString(n) ) );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
if ( width > ret.x )
ret.x = width;
}

View File

@ -448,14 +448,11 @@ wxSize wxChoice::DoGetBestSize() const
ret.x = 0;
if ( m_widget )
{
GdkFont *font = m_font.GetInternalFont();
wxCoord width;
int width;
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
// FIXME GTK 2.0
width = (wxCoord)gdk_string_width(font, wxGTK_CONV( GetString(n) ) );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
if ( width > ret.x )
ret.x = width;
}

View File

@ -750,13 +750,11 @@ wxSize wxComboBox::DoGetBestSize() const
ret.x = 0;
if ( m_widget )
{
GdkFont *font = m_font.GetInternalFont();
wxCoord width;
size_t count = Number();
int width;
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
width = (wxCoord)gdk_string_width(font, wxGTK_CONV( GetString(n) ) );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
if ( width > ret.x )
ret.x = width;
}