Had to change the time point, when widgets are
created (no longer forced). This seems to break wxNotebook... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -825,8 +825,6 @@ void wxWindowDC::GetTextExtent( const wxString &string, long *width, long *heigh
|
||||
long *descent, long *externalLeading,
|
||||
wxFont *theFont, bool WXUNUSED(use16) )
|
||||
{
|
||||
wxCHECK_RET( Ok(), _T("invalid window dc") );
|
||||
|
||||
wxFont fontToUse = m_font;
|
||||
if (theFont) fontToUse = *theFont;
|
||||
|
||||
@@ -839,16 +837,12 @@ void wxWindowDC::GetTextExtent( const wxString &string, long *width, long *heigh
|
||||
|
||||
long wxWindowDC::GetCharWidth()
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, _T("invalid window dc") );
|
||||
|
||||
GdkFont *font = m_font.GetInternalFont( m_scaleY );
|
||||
return long(gdk_string_width( font, "H" ) / m_scaleX);
|
||||
}
|
||||
|
||||
long wxWindowDC::GetCharHeight()
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, _T("invalid window dc") );
|
||||
|
||||
GdkFont *font = m_font.GetInternalFont( m_scaleY );
|
||||
return long((font->ascent + font->descent) / m_scaleY);
|
||||
}
|
||||
@@ -883,8 +877,6 @@ void wxWindowDC::Clear()
|
||||
|
||||
void wxWindowDC::SetFont( const wxFont &font )
|
||||
{
|
||||
wxCHECK_RET( Ok(), _T("invalid window dc") );
|
||||
|
||||
m_font = font;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user