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:
@@ -1374,11 +1374,12 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
|
|||||||
#else
|
#else
|
||||||
wxCoord width = gdk_string_width( font, text.mbc_str() );
|
wxCoord width = gdk_string_width( font, text.mbc_str() );
|
||||||
wxCoord height = font->ascent + font->descent;
|
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_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() );
|
||||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height );
|
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() );
|
gdk_draw_string( m_window, font, m_textGC, x, y + font->ascent, text.mbc_str() );
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1374,11 +1374,12 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
|
|||||||
#else
|
#else
|
||||||
wxCoord width = gdk_string_width( font, text.mbc_str() );
|
wxCoord width = gdk_string_width( font, text.mbc_str() );
|
||||||
wxCoord height = font->ascent + font->descent;
|
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_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() );
|
||||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height );
|
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() );
|
gdk_draw_string( m_window, font, m_textGC, x, y + font->ascent, text.mbc_str() );
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user