corrected textbackground for theme text output
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1321,17 +1321,12 @@ inline int FixedToInt( Fixed inFixed )
|
|||||||
void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
||||||
double angle)
|
double angle)
|
||||||
{
|
{
|
||||||
|
// TODO support text background color (only possible by hand, ATSUI does not support it)
|
||||||
wxCHECK_RET( Ok(), wxT("wxDC::DoDrawRotatedText Invalid window dc") );
|
wxCHECK_RET( Ok(), wxT("wxDC::DoDrawRotatedText Invalid window dc") );
|
||||||
/*
|
|
||||||
if (angle == 0.0 )
|
|
||||||
{
|
|
||||||
DrawText(str, x, y);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( str.Length() == 0 )
|
if ( str.Length() == 0 )
|
||||||
return ;
|
return ;
|
||||||
*/
|
|
||||||
wxMacFastPortSetter helper(this) ;
|
wxMacFastPortSetter helper(this) ;
|
||||||
MacInstallFont() ;
|
MacInstallFont() ;
|
||||||
|
|
||||||
@@ -1434,12 +1429,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
useDrawThemeText = false ;
|
useDrawThemeText = false ;
|
||||||
#endif
|
#endif
|
||||||
MacInstallFont() ;
|
MacInstallFont() ;
|
||||||
if ( 0 )
|
|
||||||
{
|
|
||||||
m_macFormerAliasState = IsAntiAliasedTextEnabled(&m_macFormerAliasSize);
|
|
||||||
SetAntiAliasedTextEnabled(true, 8);
|
|
||||||
m_macAliasWasEnabled = true ;
|
|
||||||
}
|
|
||||||
FontInfo fi ;
|
FontInfo fi ;
|
||||||
::GetFontInfo( &fi ) ;
|
::GetFontInfo( &fi ) ;
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
@@ -1491,14 +1481,6 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
wxCharBuffer text = linetext.mb_str(wxConvLocal) ;
|
wxCharBuffer text = linetext.mb_str(wxConvLocal) ;
|
||||||
if ( m_backgroundMode != wxTRANSPARENT )
|
|
||||||
{
|
|
||||||
Rect frame = { yy - fi.ascent + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy - fi.ascent + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
|
|
||||||
short width = ::TextWidth( text , 0 , strlen(text) ) ;
|
|
||||||
frame.right = frame.left + width ;
|
|
||||||
|
|
||||||
::EraseRect( &frame ) ;
|
|
||||||
}
|
|
||||||
::DrawText( text , 0 , strlen(text) ) ;
|
::DrawText( text , 0 , strlen(text) ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1701,6 +1683,11 @@ void wxDC::MacInstallFont() const
|
|||||||
// return ;
|
// return ;
|
||||||
Pattern blackColor ;
|
Pattern blackColor ;
|
||||||
MacSetupBackgroundForCurrentPort(m_backgroundBrush) ;
|
MacSetupBackgroundForCurrentPort(m_backgroundBrush) ;
|
||||||
|
if ( m_backgroundMode != wxTRANSPARENT )
|
||||||
|
{
|
||||||
|
Pattern whiteColor ;
|
||||||
|
::BackPat(GetQDGlobalsWhite(&whiteColor));
|
||||||
|
}
|
||||||
if ( m_font.Ok() )
|
if ( m_font.Ok() )
|
||||||
{
|
{
|
||||||
::TextFont( m_font.MacGetFontNum() ) ;
|
::TextFont( m_font.MacGetFontNum() ) ;
|
||||||
|
Reference in New Issue
Block a user