fixed nice bug in wxGTK which always draw the text with the same foreground colour as background one in wxSOLID mode

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-10-23 17:41:51 +00:00
parent 5d2878fb28
commit 2c37aade57
2 changed files with 6 additions and 4 deletions

View File

@@ -1374,11 +1374,12 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
#else
wxCoord width = gdk_string_width( font, text.mbc_str() );
wxCoord height = font->ascent + font->descent;
/* CMB 21/5/98: draw text background if mode is wxSOLID */
if (m_backgroundMode == wxSOLID)
if ( m_backgroundMode == wxSOLID )
{
gdk_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() );
gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height );
gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() );
}
gdk_draw_string( m_window, font, m_textGC, x, y + font->ascent, text.mbc_str() );
#endif